Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _07._Train_The_Trainers
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int judgesCount = int.Parse(Console.ReadLine());
  10. double avarageAll = 0;
  11. int count = 0;
  12.  
  13. while (true)
  14. {
  15. string presentation = Console.ReadLine();
  16. if (presentation == "Finish")
  17. {
  18. Console.WriteLine($"Student's final assessment is {avarageAll / count:f2}.");
  19. break;
  20. }
  21. double avarageRaiting = 0;
  22.  
  23. for (int i = 0; i < judgesCount; i++)
  24. {
  25. double evaluation = double.Parse(Console.ReadLine());
  26. count++;
  27. avarageAll += evaluation;
  28. avarageRaiting += evaluation;
  29. }
  30. Console.WriteLine($"{presentation} - {avarageRaiting/judgesCount:f2}.");
  31. }
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement