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