Guest User

Untitled

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