bacco

Дядо Ставри: Grandpa Stavri

Feb 5th, 2018
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.16 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Footbal
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             var days = double.Parse(Console.ReadLine());
  10.  
  11.             double litersRakiya = 0;
  12.             double rakiyaDegree = 0;
  13.  
  14.             for (int i = 1; i <= days; i++)
  15.             {
  16.                 var countRakiya = double.Parse(Console.ReadLine());
  17.                 var countRakiyaDegree = double.Parse(Console.ReadLine());
  18.  
  19.                 litersRakiya = litersRakiya + countRakiya;
  20.                 rakiyaDegree = rakiyaDegree + (countRakiya * countRakiyaDegree);
  21.             }
  22.  
  23.             double degree = rakiyaDegree / litersRakiya;
  24.  
  25.             Console.WriteLine($"Liter: {litersRakiya:f2}");
  26.             Console.WriteLine($"Degrees: {degree:f2}");
  27.  
  28.             if (degree < 42 && 38 < degree)
  29.             {
  30.                 Console.WriteLine("Super!");
  31.             }
  32.             else if (degree > 42)
  33.             {
  34.             Console.WriteLine("Dilution with distilled water!");
  35.             }
  36.             else
  37.             {
  38.                 Console.WriteLine("Not good, you should baking!");
  39.             }
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment