desislava_topuzakova

09. Yard Greening

Jan 8th, 2022
1,544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     double area;
  7.     cin >> area;
  8.  
  9.     double totalPrice = area * 7.61;
  10.     double discount = totalPrice * 0.18;
  11.     double finalPrice = totalPrice * 0.82;
  12.  
  13.     cout.setf(ios::fixed);
  14.     cout.precision(2);
  15.  
  16.     cout << "The final price is: " << finalPrice << " lv." << endl;
  17.     cout << "The discount is: " << discount << " lv.";
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment