Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Graduation
- {
- class Program
- {
- static void Main(string[] args)
- {
- string nameOfStudent = Console.ReadLine();
- double numberOfMark = 1;
- double totalSum = 0.0;
- while (numberOfMark <= 12)
- {
- double mark = double.Parse(Console.ReadLine());
- totalSum += mark;
- numberOfMark++;
- }
- double AverageSum = totalSum / 12;
- if (totalSum >= 4.00)
- {
- Console.WriteLine($"{nameOfStudent} graduated. Average grade: {AverageSum:F2}");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement