17.WAP to accept any three unequal integer and print in ascending order.

CODE:

print("Enter any 3 unequal number")
a=int(input())
b=int(input())
c=int(input())
if a<b:
if a<c:
if b<c:
print(a,b,c)
else:
print(a,c,b)
else:
print(c,a,b)

elif b<c:
if a<c:
print(b,a,c)
elif b<c:
print(b,c,a)
else:
print(c,b,a)
OUTPUT:
Enter any 3 unequal number
9
5
6
5 6 9





Comments

Popular posts from this blog