Advertisement
Spocoman

Wedding Party

Oct 6th, 2023
749
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int guests, budget;
  8.     cin >> guests >> budget;
  9.    
  10.     budget -= guests * 20;
  11.  
  12.     if (budget < 0) {
  13.         cout << "They won't have enough money to pay the covert. They will need " << abs(budget) << " lv more.\n";
  14.     }
  15.     else {
  16.         cout << "Yes! " << round(0.40 * budget) << " lv are for fireworks and " << round(0.60 * budget) << " lv are for donation.\n";
  17.     }
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement