Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class JoroTheFootballPlayer
- {
- static void Main()
- {
- string year = Console.ReadLine(); // "t" is leap year, "f" is normal year
- double holidays = double.Parse(Console.ReadLine());
- double hometownWeekends = double.Parse(Console.ReadLine());
- double totalWeekends = 52;
- double normalWeekends = totalWeekends - hometownWeekends;
- double notTiredWeekends = (normalWeekends * 2 / 3);
- double holidayPlays = holidays / 2;
- double totalPlays;
- if (year == "t")
- {
- totalPlays = holidayPlays + notTiredWeekends + hometownWeekends + 3;
- Console.WriteLine("{0}", (int)totalPlays);
- }
- else if (year == "f")
- {
- totalPlays = holidayPlays + notTiredWeekends + hometownWeekends;
- Console.WriteLine("{0}", (int)totalPlays);
- }
- else
- {
- Console.WriteLine("Wrong Input");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement