Untitled
Anonymous
plain_text
02/06/2024 6:07 PM
844 B
19
Indexable
string name = Console.ReadLine();
double academyPoints = double.Parse(Console.ReadLine());
int jurys = int.Parse(Console.ReadLine());
double totalPoints = 0;
for (int i = 0; i <= jurys; i++)
{
string juryName = Console.ReadLine();
double juryPoints = double.Parse(Console.ReadLine());
double lenght = juryName.Length;
totalPoints += academyPoints + (juryPoints * lenght / 2);
}
if (totalPoints > 1250.5)
Console.WriteLine($"Congratulations, {name} got a nominee for leading role with {totalPoints}!");
else
Console.WriteLine($"Sorry, {name} you need {1250.5 - totalPoints} more!");Editor is loading...
Leave a Comment