Advertisement
Spocoman

06. Repainting

Aug 31st, 2023 (edited)
753
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int nylon, paint, thinner, hours;
  7.     cin >> nylon >> paint >> thinner >> hours;
  8.  
  9.     double materialsPrice = (nylon + 2) * 1.50 + paint * 14.50 * 1.1 + thinner * 5 + 0.40;
  10.     double workersPrice = materialsPrice * hours * 0.30;
  11.     double totalPrice = materialsPrice + workersPrice;
  12.  
  13.     cout << totalPrice << endl;
  14.  
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement