Advertisement
GareginBorboryan

Volleyball

Feb 8th, 2017
1,122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.28 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _12_Volleyball
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.            
  14.             var god = Console.ReadLine().ToLower();
  15.             var p = double.Parse(Console.ReadLine());
  16.             var h = double.Parse(Console.ReadLine());
  17.             var weekend = 48;
  18.            
  19.                 if (god == "leap")
  20.                 {
  21.  
  22.                     double sofiaw = weekend - h;
  23.                     sofiaw = sofiaw * 3.0 / 4;
  24.                     double sofiap = p * 2.0 / 3;
  25.                     double sofiashumen = sofiaw + h + sofiap;
  26.                     double procent = sofiashumen * 0.15;
  27.                     double total = sofiashumen + procent;
  28.                     Console.WriteLine(Math.Truncate(total));
  29.                 }
  30.  
  31.                 if (god == "normal")
  32.                 {
  33.                     double sofiaw = weekend - h;
  34.                     sofiaw = sofiaw * 3.0 / 4;
  35.                     double sofiap = p * 2.0 / 3;
  36.                     double sofiashumen = sofiaw + h + sofiap;
  37.                     Console.WriteLine(Math.Truncate(sofiashumen));
  38.                
  39.             }
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement