Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int judges = int.Parse(Console.ReadLine());
- double allPresentationGrade = 0.0;
- double gradeCounter = 0.0;
- while (true)
- {
- string presentation = Console.ReadLine();
- double presentationScore = 0.0;
- if (presentation == "Finish")
- {
- double gradeSum = allPresentationGrade / gradeCounter;
- Console.WriteLine("Student's final assessment is " + gradeSum);
- break;
- }
- for (int i = 0; i < judges; i++)
- {
- double grade = double.Parse(Console.ReadLine());
- presentationScore += grade;
- allPresentationGrade += grade;
- gradeCounter++;
- }
- double presentationCurrentGrade = presentationScore / judges;
- Console.WriteLine(presentation+" - "+presentationCurrentGrade +".");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement