Largest In Three Using Logical Operator - C# Program

C# Program Largest In Three Using Logical Operator

using System;

namespace LargestInThreeUsingLogicalOperator
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b, c;
            Console.Write("Enter the value of A:");
            a = Convert.ToInt32(Console.ReadLine());
            Console.Write("Enter the value of B:");
            b = Convert.ToInt32(Console.ReadLine());
            Console.Write("Enter the value of C:");
            c = Convert.ToInt32(Console.ReadLine());
            if (a > b && a > c)
                Console.WriteLine("A is Largest");
            else if (b > a && b > c)
                Console.WriteLine("B is Largest");
            else if (c > a && c > b)
                Console.WriteLine("C is Largest");
            else
                Console.WriteLine("equals");

            Console.ReadKey();
        }
    }
}

Output - C# Program Largest In Three Using Logical Operator

Enter the value of A: 22
Enter the value of B: 10
Enter the value of C: 5
    
A is Largest