Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5. public static void Main()
  6. {
  7. int judges = int.Parse(Console.ReadLine());
  8. double allPresentationGrade = 0.0;
  9. double gradeCounter = 0.0;
  10. while (true)
  11. {
  12. string presentation = Console.ReadLine();
  13. double presentationScore = 0.0;
  14. if (presentation == "Finish")
  15. {
  16. double gradeSum = allPresentationGrade / gradeCounter;
  17. Console.WriteLine("Student's final assessment is " + gradeSum);
  18. break;
  19. }
  20. for (int i = 0; i < judges; i++)
  21. {
  22. double grade = double.Parse(Console.ReadLine());
  23. presentationScore += grade;
  24. allPresentationGrade += grade;
  25. gradeCounter++;
  26. }
  27. double presentationCurrentGrade = presentationScore / judges;
  28. Console.WriteLine(presentation+" - "+presentationCurrentGrade +".");
  29. }
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement