Advertisement
knikolov98

Untitled

Sep 17th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Volleyball
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string typeYear = Console.ReadLine();
  10.             double p = double.Parse(Console.ReadLine());
  11.             double h = double.Parse(Console.ReadLine());
  12.             double wikendsSofia = 48 - h;
  13.  
  14.             double playWeekendsSofia = wikendsSofia * 0.75;
  15.             double hometownPlay = h;
  16.             double HollidayPlays = p * 2.0 / 3;
  17.             double totalGames = playWeekendsSofia + h + HollidayPlays;
  18.             double yearLeap = totalGames + (totalGames * 0.15);
  19.             if (typeYear == "normal")
  20.             {
  21.                 Console.WriteLine(Math.Floor(totalGames));
  22.             }
  23.             else
  24.             {
  25.                 Console.WriteLine(Math.Floor(yearLeap));
  26.             }
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement