Train The Trainers
Здравейте. Имам проблем с извеждането на Student's final assessment. Може ли помощ?
Това е кодът ми:
using System;
using System.Diagnostics;
namespace Train_The_Trainers
{
internal class Program
{
static void Main(string[] args)
{
int jury = int.Parse(Console.ReadLine());
string input = Console.ReadLine();
double average=0;
int count = 0;
int gradeCount = 0;
double totalAverage = 0;
while (input != "Finish")
{
double sum = 0; count++;
for (int i = 0; i < jury; i++)
{
double grade = double.Parse(Console.ReadLine());
gradeCount++;
sum += grade;
totalAverage += sum;
}
average = sum / jury;
Console.WriteLine($"{input} - {average:f2}.");
input = Console.ReadLine();
}
Console.WriteLine($"Student's final assessment is {(totalAverage/(gradeCount)):f2}.");
}
}
}