CalvinManalo / -IT2105

0 stars 0 forks source link

IT2105_Seatwork1_MANALO #1

Open CalvinManalo opened 1 month ago

CalvinManalo commented 1 month ago

public class HelloWorld { public static void Main(string[] args) { Console.WriteLine ("Science: "); int sci = Convert.ToInt32(Console.ReadLine());

    Console.WriteLine ("Math: ");
    int math = Convert.ToInt32(Console.ReadLine());

    Console.WriteLine ("Filipino: ");
    int fil = Convert.ToInt32(Console.ReadLine());

    Console.WriteLine ("English: ");
    int eng = Convert.ToInt32(Console.ReadLine());

    double sum = sci + math + fil + eng;
    double ave = sum / 4;

    Console.WriteLine();
    Console.WriteLine("Average: "+ave);

    Console.WriteLine();

    if (ave > 100)
    {
        Console.WriteLine("Invalid");
    }

    else if (ave >= 98)
    {
        Console.WriteLine("Highest Honor");
    }

    else if (ave >= 95)
    {
        Console.WriteLine("High Honor");
    }

    else if (ave >= 90)
    {
        Console.WriteLine("With Honor");
    }

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

    else if (ave <= 74.99)
    {
        Console.WriteLine("High Honor");
    }

}

}

CalvinManalo commented 1 month ago

Screenshot 2024-09-20 114418