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

Diagonal Relationship between Beryllium and Aluminium || Relation between Beryllium and Aluminium

KVS CBSE Worksheets CHAPTER 1 Electric Charges and Fields Class 12

S-Block Elements || S-block element class 11 chapter 8 || Group 1A, 2A elements || S block elements chapter 8 notes class 11 || Chemistry ||

Electric Charges and Fields || Electrostatics Notes || Physics || Class 12 || Chapter 1 Notes Class 12 ||

Diwali 2020 || Deepawali 2020 || Happy diwali || Festival of lights || 2020 ||