Write a python program to find the greatest number from three numbers.

                                    Write a python program to determine whether a person is eligible to vote.

Write a python program to find the greatest number from three numbers.

PROGRAM:

a=int(input("Enter a number1:"))

b=int(input("Enter a number2:"))

c=int(input("Enter a number3:"))

if (a>b) and (a>c):

    print(a,"is a greatest number.")

elif (b>a) and (b>c):

    print(b,"is a greatest number.")

elif (c>a) and (c>b):

    print(c,"is a greatest number.")

else:

    print("Sorry! Invalid input.")

OUTPUT:

No comments:

Post a Comment




Copyright Ⓒ 2022 | Mechpedia | All Right Reserved.