Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace tESt
- {
- class Program
- {
- static void Main(string[] args)
- {
- var yearType = Console.ReadLine().ToLower();
- var holidays = double.Parse(Console.ReadLine());
- var weekends = double.Parse(Console.ReadLine());
- if (yearType == "normal")
- {
- var weekendsSofia = 48 - weekends;
- var saturdayGames = (weekendsSofia * (3 / 4.0));
- var sundayGames = weekends;
- var gamesSofiaHolidays = holidays * (2 / 3.0);
- var totalResult = saturdayGames + sundayGames + gamesSofiaHolidays;
- Console.WriteLine(Math.Floor(totalResult));
- }
- else if (yearType == "leap")
- {
- var weekendsSofia = 48 - weekends;
- var saturdayGames = (weekendsSofia * (3 / 4.0));
- var sundayGames = weekends;
- var gamesSofiaHolidays = holidays * (2 / 3.0);
- var totalResult = saturdayGames + sundayGames + gamesSofiaHolidays;
- var leapTotalResult = totalResult + (totalResult * 0.15);
- Console.WriteLine(Math.Floor(leapTotalResult));
- }
- else
- {
- Console.WriteLine("Error!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement