Advertisement
Spocoman

09. Yard Greening

Aug 23rd, 2024
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     double squareMeters;
  6.     cin >> squareMeters;
  7.  
  8.     double price = squareMeters * 7.61;
  9.     double discount = price * 0.18;
  10.     double finalPrice = price - discount;
  11.  
  12.     printf("The final price is: %.2f lv.\n", finalPrice);
  13.     printf("The discount is: %.2f lv.\n", discount);
  14.  
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement