Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main() {
- string year;
- double holiday, home_weekend;
- cin >> year >> holiday >> home_weekend;
- double sofia_weekend = 48 - home_weekend;
- double sofia_play = sofia_weekend * 3 / 4;
- double holiday_play = holiday * 2 / 3;
- double play = sofia_play + holiday_play + home_weekend;
- if (year == "normal")
- {
- cout << floor(play) << endl;
- }
- else
- {
- cout << floor(play * 1.15) << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement