Advertisement
Spocoman

Godzilla vs. Kong

Sep 20th, 2023 (edited)
638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     double budget;
  7.     cin >> budget;
  8.  
  9.     int statists;
  10.     cin >> statists;
  11.  
  12.     double dresses;
  13.     cin >> dresses;
  14.  
  15.     double decors = budget / 10;
  16.  
  17.     if (statists > 150) {
  18.         dresses *= 0.9;
  19.     }
  20.  
  21.     double price = decors + statists * dresses;
  22.  
  23.     cout.setf(ios::fixed);
  24.     cout.precision(2);
  25.  
  26.     if (budget >= price) {
  27.         cout << "Action!" << endl;
  28.         cout << "Wingard starts filming with " << budget - price << " leva left." << endl;
  29.     }
  30.     else {
  31.         cout << "Not enough money!" << endl;
  32.         cout << "Wingard needs " << price - budget << " leva more." << endl;
  33.     }
  34.    
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement