Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class TravellerBob
- {
- static void Main()
- {
- string leapYear = Console.ReadLine();
- int contractMonths = int.Parse(Console.ReadLine());
- int familyMonths = int.Parse(Console.ReadLine());
- double travels = 0;
- travels += contractMonths * 4 * 3;
- travels += familyMonths * 2 * 2;
- double normalMonthsTravels = (12 - (contractMonths + familyMonths)) * 12 * 0.6;
- travels += normalMonthsTravels;
- if (leapYear == "leap")
- {
- travels *= 1.05;
- }
- Console.WriteLine((int)travels);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment