Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace TraintheTrainers
- {
- class Program
- {
- static void Main(string[] args)
- {
- int jury = int.Parse(Console.ReadLine());
- string presentation = Console.ReadLine();
- double average = 0;
- double averageTotal = 0;
- int counter = 0;
- while (presentation != "Finish")
- {
- for (int i = 1; i <= jury; i++)
- {
- double score = double.Parse(Console.ReadLine());
- average += score;
- if (jury == i)
- {
- Console.WriteLine($"{presentation} - {average / jury:F2}.");
- averageTotal += average;
- average = 0;
- break;
- }
- }
- counter++;
- presentation = Console.ReadLine();
- }
- Console.WriteLine($"Student's final assessment is {averageTotal / (counter * jury):F2}.");
- }
- }
- }
Add Comment
Please, Sign In to add comment