Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int number_of_tables;
- double width_of_table;
- double height_of_table;
- cin >> number_of_tables >> height_of_table >> width_of_table;
- double area_of_coverage = number_of_tables * (width_of_table + 2 * 0.3) * (height_of_table + 2 * 0.3);
- double area_of_kare = number_of_tables * (height_of_table / 2) * (height_of_table / 2);
- double total_price_in_dollars = area_of_coverage * 7 + area_of_kare * 9;
- double total_price_in_leva = total_price_in_dollars * 1.85;
- cout << fixed << setprecision(2) << total_price_in_dollars << " USD" << endl;
- cout << fixed << setprecision(2) << total_price_in_leva << " BGN" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement