Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Equal_Sums_Left_Right_Position
- {
- class Program
- {
- static void Main(string[] args)
- {
- int jury = int.Parse(Console.ReadLine());
- string command = Console.ReadLine();
- double sumofAllP = 0;
- int cnt = 0;
- while(command != "Finsih")
- {
- double sumGradesforP = 0;
- for(int i = 1;i <= jury; i++)
- {
- double grade = double.Parse(Console.ReadLine());
- cnt++;
- sumGradesforP += grade;
- sumofAllP += grade;
- }
- double avgforP = sumGradesforP / jury;
- Console.WriteLine($"{command} - {avgforP:f2}");
- command = Console.ReadLine();
- }
- double arerageforAllP = sumofAllP / cnt;
- if (command == "Finish")
- {
- Console.WriteLine($"Student's final assessment is { arerageforAllP:F2}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement