OfalzaDenz / IT2105

0 stars 0 forks source link

IT2105_Seatwork_Ofalza #1

Open OfalzaDenz opened 2 hours ago

OfalzaDenz commented 2 hours ago

using System;

public class HelloWorld { public static void Main(string[] args) { Console.Write ("English: "); int eng = Convert.ToInt32( Console.ReadLine()); Console.Write ("Math: "); int mat = Convert.ToInt32( Console.ReadLine()); Console.Write ("Science: "); int sci = Convert.ToInt32( Console.ReadLine()); Console.Write ("Mapeh: "); int map = Convert.ToInt32( Console.ReadLine());

   double sum = eng + mat + sci + map;
   double avg = sum / 4;
     Console.WriteLine ("Average :" + avg);

     if (avg >100)
     {
      Console.WriteLine (" Invalid Grade ");
     }
    else if (avg >98)
     {
      Console.WriteLine (" With Highest Honors ");
     }
     else if (avg >95)
     {
      Console.WriteLine (" With High Honors ");
     }
     else if (avg > 90)
     {
      Console.WriteLine (" With  Honors ");
     }

     else if (avg >75)
     {
      Console.WriteLine (" Passed ");
     }

     else if (avg <75)
     {
      Console.WriteLine (" Failed");
     }
}

}

OfalzaDenz commented 2 hours ago

image