Advertisement
silvana1303

volleyball

Mar 30th, 2020
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2.  
  3. namespace homeworkconditional
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string leapNormal = Console.ReadLine();
  10.             var p = double.Parse(Console.ReadLine());
  11.             var h = double.Parse(Console.ReadLine());
  12.  
  13.             var games = ((48 - h) * 3 / 4) + h + (p * 2 / 3);
  14.  
  15.             if (leapNormal == "leap")
  16.             {
  17.                 games *= 1.15;
  18.             }
  19.  
  20.             Console.WriteLine($"{Math.Floor(games)}");
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement