Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string typeOfYear;
- int holidays, hometownWeekends;
- double totalPlays, normalPlays;
- string mystr;
- cin >> typeOfYear;
- cin >> holidays;
- cin >> hometownWeekends;
- normalPlays = (52 - hometownWeekends) * 2.0 / 3;
- totalPlays = hometownWeekends;
- totalPlays += normalPlays;
- totalPlays += holidays / 2.0;
- if (typeOfYear == "t")
- {
- totalPlays += 3;
- }
- int result = (int)totalPlays;
- cout << result;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement