Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- double budget;
- cin >> budget;
- int statists;
- cin >> statists;
- double dresses;
- cin >> dresses;
- double decors = budget / 10;
- if (statists > 150) {
- dresses *= 0.9;
- }
- double price = decors + statists * dresses;
- cout.setf(ios::fixed);
- cout.precision(2);
- if (budget >= price) {
- cout << "Action!" << endl;
- cout << "Wingard starts filming with " << budget - price << " leva left." << endl;
- }
- else {
- cout << "Not enough money!" << endl;
- cout << "Wingard needs " << price - budget << " leva more." << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement