Karding8 / IT2105

0 stars 0 forks source link

IT2105_LabActivity4_Rozul #1

Open Karding8 opened 2 hours ago

Karding8 commented 2 hours ago

using System;

class Program { static void Main() {

    Console.Write("No. of test cases: ");
    string inputT = Console.ReadLine();
    int T = Convert.ToInt32(inputT);

    for (int i = 0; i < T; i++)
    {
        Console.Write("Enter Uber and Grab charges (X Y): ");
        string input = Console.ReadLine();
        string[] charges = input.Split();
        int X = Convert.ToInt32(charges[0]);
        int Y = Convert.ToInt32(charges[1]);
        if (X < Y)
        {
            Console.WriteLine("FIRST"); 
        }
        else if (X > Y)
        {
            Console.WriteLine("SECOND"); 
        }
        else
        {
            Console.WriteLine("ANY"); 
        }
    }
}

}

Karding8 commented 2 hours ago

image output