DEV Community

PERUMAL S
PERUMAL S

Posted on

Task-3 Qsn-5

Create a program that takes three numbers as input and prints the largest of the three.

Ans

note i have added Loop

while True:
num1=int(input("enter a number 1:"))
num2=int(input("enter a number 2:"))
num3=int(input("enter a number 3:"))
if num2<=num1>=num3:
print ("biggest num is",num1)
elif num1<=num2>=num3:
print ("biggest num is",num2)
else:
print ("biggest num is",num3)

Top comments (0)