only if else and Console.ReadLine() or Console.Read() and Console.WriteLine() are used
using System;
class example11
{
public static void Main()
{
Console.WriteLine("***************************************");
Console.WriteLine("ID name midexam finalexam total average grade");
Console.WriteLine("***************************************");
int id = Console.Read();
char name = Console.Read();
int mid = Console.Read();
int last = Console.Read();
int total = mid + last;
int avg = total / 2;
if (avg >= 90 && avg <= 100)
{
Console.WriteLine(id, name, mid, last, total, avg, "A");
}
else if (avg > 80 && avg < 89)
{
Console.WriteLine(id, name, mid, last, total, avg, "B");
}
else if (avg > 70 && avg < 79)
{
Console.WriteLine(id, name, mid, last, total, avg, "C");
}
else if (avg > 60 && avg < 69)
{
Console.WriteLine(id, name, mid, last, total, avg, "D");
}
else if (avg > 0 && avg < 59)
{
Console.WriteLine(id, name, mid, last, total, avg, "F");
}
}
}