anizko

10. Volleyball

Apr 1st, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Journey
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             string Year = Console.ReadLine();
  11.             double Holliday = double.Parse(Console.ReadLine());
  12.             double HomeTown = double.Parse(Console.ReadLine());
  13.  
  14.             double Week = 48;
  15.             double play = 0;
  16.  
  17.  
  18.             double StaySofia = Week - HomeTown;
  19.          
  20.  
  21.             double PlaySofia =  (StaySofia *3/4)+(Holliday*2/3);
  22.            
  23.             double PlayHomeTown = HomeTown;
  24.             play = PlayHomeTown+ PlaySofia;
  25.  
  26.  
  27.             if (Year == "normal")
  28.             {
  29.                 Console.WriteLine(Math.Floor(play));
  30.             }
  31.             else if (Year == "leap")
  32.             {
  33.                 play = play+(play * 15 / 100);
  34.                 Console.WriteLine(Math.Floor(play));
  35.  
  36.             }
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.            
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment