Write a Python program to to find greater among three numbers.

 Code:-

first_num=int(input(“Enter first number:-“))
Second_num=int(input(“Enter Second number:-“))
third_num=int(input(“Enter third number:-“))
if first_num>Second_num:
if first_num>third_num:
print(first_num,“is geatest number”)
elif first_num<third_num:
print(third_num,“is greatest number”)
else:
print(first_num,“is greatest number”)
else:
if Second_num>third_num:
print(Second_num,“is greatest number”)
elif Second_num<third_num:
print(third_num,“is greatest number”)
else:
print(Second_num,“is greatest number”)

Output:-

Enter first number:-11
Enter Second number:-31
Enter third number:-54
54 is greatest number



Leave a Reply

Your email address will not be published.