anizko

07. Train The Trainers

Apr 19th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.23 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Train_The_Trainers
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int CountJury = int.Parse(Console.ReadLine());
  10.             string NamePresentacion = Console.ReadLine();
  11.             double MidllePresentacion = 0;
  12.             double TotalScore = 0;
  13.             double Total = 0;
  14.             double MiddleTotal = 0;
  15.             int CounterPresentacion = 0;
  16.  
  17.             while(NamePresentacion !="Finish")
  18.             {
  19.                
  20.                
  21.                 for(int i=1;i<= CountJury; i++)
  22.                 {
  23.                     double Score = double.Parse(Console.ReadLine());
  24.                     TotalScore += Score;
  25.                 }
  26.                 MidllePresentacion = TotalScore / CountJury;
  27.                 Console.WriteLine($"{NamePresentacion} - {MidllePresentacion:f2}.");
  28.  
  29.                 Total += MidllePresentacion;
  30.                 CounterPresentacion++;
  31.                 NamePresentacion = Console.ReadLine();
  32.                 TotalScore = 0;
  33.             }
  34.  
  35.             MiddleTotal = Total / CounterPresentacion;
  36.  
  37.             Console.WriteLine($"Student's final assessment is {MiddleTotal:f2}.");
  38.            
  39.         }
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment