Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- string name = Console.ReadLine();
- double gradesSum =0;
- double presentationSum =0;
- int counterPresentations =0;
- while (name!= "Finish")
- {
- for (int i=1; i<=n; i++)
- {
- double grade = double.Parse(Console.ReadLine());
- gradesSum += grade;
- }
- presentationSum += gradesSum;
- Console.WriteLine("{0} - {1:f2}.",name,gradesSum/n);
- gradesSum =0;
- counterPresentations++;
- name=Console.ReadLine();
- }
- Console.WriteLine("Student's final assessment is {0:f2}.",presentationSum/(counterPresentations*n));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement