Graduation 80% judge
Здравейте,
Решавам задача от while цикли Graduation.
Judge ми дава 80%
Някой може ли да ми помогне да открия грешката?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Graduation
{
class Program
{
static void Main(string[] args)
{
string student = Console.ReadLine();
int counter = 12;
double sum = 0;
while (counter > 0)
{
double result = double.Parse(Console.ReadLine());
sum += result;
counter--;
}
double averageResult = sum / 12;
if (averageResult >= 4.00) { Console.WriteLine("{0} graduated. Average grade: {1:f2}", student, averageResult); }
}
}
}
Благодаря!