Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cmath>
- using namespace std;
- int main() {
- int people;
- cin >> people;
- double entrancePrice, deskChairPrice, umbrellaPrice;
- cin >> entrancePrice >> deskChairPrice >> umbrellaPrice;
- double total = entrancePrice * people + deskChairPrice * ceil(0.75 * people) + umbrellaPrice * ceil(0.5 * people);
- printf("%.2f lv.\n", total);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement