#Get user input a = int(input("Enter the first number: ")) b = int(input("Enter the second number: ")) c = int(input("Enter the third number: ")) small = 0 middle = 0 large = 0 # IF Statement #SMALL if a < b and a < c: small = a elif b < a and b < c: small = b else: small = c #MIDDLE if (a < b and b < c) or ( c < b and b < a): middle = b elif( b < a and a < c )or (c < a and a < b): middle = a elif (a < c and c < b) or (b < c and c < a)we: middle = c #LARGE if a > b and a > c: large = a elif b > a and b > c: large = b else: large = c # Display Results print("The numbers in accending order are: ", large, middle, small)
[split] Manual Sort without Sort function
Messages In This Thread |
[split] Manual Sort without Sort function - by fulir16 - Jun-01-2019, 01:54 PM
RE: [split] Manual Sort without Sort function - by micseydel - Jun-01-2019, 05:43 PM
RE: [split] Manual Sort without Sort function - by perfringo - Jun-02-2019, 06:13 AM
|
Users browsing this thread: 1 Guest(s)