Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _08trainTheTrainers
- {
- class Program
- {
- static void Main(string[] args)
- {
- int numberJury = int.Parse(Console.ReadLine());
- double sum = 0;
- double allSum = 0;
- double midleSum = 0;
- int counter = 0;
- string namePresentation = "";
- while (true)
- {
- namePresentation = Console.ReadLine();
- if (namePresentation == "Finish")
- {
- break;
- }
- for (int i = 1; i <= numberJury; i++)
- {
- double evaluation = double.Parse(Console.ReadLine());
- sum += evaluation;
- allSum = sum / numberJury;
- counter++;
- }
- Console.WriteLine($"{namePresentation} - {allSum:f2}.");
- }
- midleSum = sum / counter;
- Console.WriteLine($"Student's final assessment is {midleSum:f2}.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment