Three Idiots

Description:

Create a program that reads three integers from the user and displays them in sorted order (from smallest to largest). Use the min and max functions to find the smallest and largest values. The middle value can be found by computing the sum of all three values, and then subtracting the minimum value and the maximum value. Test Case 1 Input (stdin) 25 12 1988 Expected Output The minimum value is 12 The maximum value is 1988 The middle value is 25 Test Case 2 Input (stdin) 9 19 1972 Expected Output The minimum value is 9 The maximum value is 1972 The middle value is 19

Program :

a=int(input())

b=int(input())

c=int(input())

if(a<b)and(a<c):

print("The minimum value is",a)

elif(b<a)and(b<c):

print("The minimum value is",b)

else:

    print("The minimum value is",c)

if(a>b)and(a>c):

print("The maximum value is",a)

elif(b>a)and(b>c):

print("The maximum value is",b)

else:

    print("The maximum value is",c)

if(a>b)and(a<c):

print("The middle value is",a)

elif(b>a)and(b<c):

print("The middle value is",b)

else:

    print("The middle value is",c)