-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
26 lines (21 loc) · 814 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
namespace CGPAcalculator
{
class Program
{
static void Main()
{
double CGPA;
float first = Single.Parse(Console.ReadLine());
float second = Single.Parse(Console.ReadLine());
float third = Single.Parse(Console.ReadLine());
float fourth = Single.Parse(Console.ReadLine());
float fifth = Single.Parse(Console.ReadLine());
float sixth = Single.Parse(Console.ReadLine());
float seventh = Single.Parse(Console.ReadLine());
float eighth = Single.Parse(Console.ReadLine());
CGPA = (first + second + third + fourth + fifth + sixth + seventh + eighth) / (8);
Console.WriteLine("Your CGPA is:" + String.Format("{0:0.00}", CGPA));
}
}
}