Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- int guests, budget;
- cin >> guests >> budget;
- budget -= guests * 20;
- if (budget < 0) {
- cout << "They won't have enough money to pay the covert. They will need " << abs(budget) << " lv more.\n";
- }
- else {
- cout << "Yes! " << round(0.40 * budget) << " lv are for fireworks and " << round(0.60 * budget) << " lv are for donation.\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement