public class HelloWorld
{
public static void Main(string[] args)
{
Console.WriteLine ("Enter grades for each subject: ");
Console.Write ("English: ");
float english = Convert.ToInt32(Console.ReadLine());
Console.Write ("Math: ");
float math = Convert.ToInt32(Console.ReadLine());
Console.Write ("Science: ");
float science = Convert.ToInt32(Console.ReadLine());
Console.Write ("MAPEH: ");
float mapeh = Convert.ToInt32(Console.ReadLine());
float total = english + math + science + mapeh;
float ave = total/4;
float result = ave;
Console.Write("Average Grade: "+result);
Console.WriteLine();
if (result > 100)
{
Console.Write("Invalid Grades");
}
else if (result >= 98)
{
Console.Write("With Highest Honors");
}
else if (result >= 95)
{
Console.Write("With High Honors");
}
else if (result >= 90)
{
Console.Write("With Honors");
}
else if (result >= 75)
{
Console.Write("Passed");
}
else
{
Console.Write("Failed");
}
}
}
using System;
public class HelloWorld { public static void Main(string[] args) { Console.WriteLine ("Enter grades for each subject: "); Console.Write ("English: "); float english = Convert.ToInt32(Console.ReadLine());