Program to check the largest number among the three numbers.

Code:

num1 = int(input("Enter number 1: "))

num2 = int(input("Enter number 2: "))

num3 = int(input("Enter number 3: "))

if (num1>num2) and (num1>num3):

    print("Number1 is the greatest!")

elif (num2>num1) and (num2>num3):

    print("Number2 is the greatest!")

else:

    print("Number3 is the greatest!")

 

Output:


Comments

Popular posts from this blog

State use of pep and pip