Write a Python program to print three numbers in Descending Order.

 a=int(input("Enter first number:"))

b=int(input("Enter second number:"))

c=int(input("Enter third number:"))


max=mid=min = None


if a>b and a>c:

    if b>c:

        max,mid,min=a,b,c

    else:

        max,mid,min=a,c,b


elif b>a and c>a:

    if b>c:

        max,mid,min=b,c,a

    else:

        max,mid,min=c,b,a



else:

    if c>a:

        max,mid,min=c,a,b

    else:

        max,mid,min=b,a,c


print("The Descending order of three no. is:", max,mid,min)


Comments

Popular posts from this blog

Why should a magnesium ribbon be cleaned before burning in air?

Banking of road || Inclination of road || Physics || Class 11 ||

Changing Trends And Career in Physical Education || Short Answer Type Questions || Short Ans Chapter 1 Class 11 Solution || Physical Education ||

Di nitrogen and dihydrogen react with each other to produce ammonia according to the following chemical equation

CHEMICAL BONDING AND MOLECULAR STRUCTURE