Sort Numbers Without Sort Function

[Solved] Sort Numbers Without Sort Function | C - Code Explorer | yomemimo.com
Question : sort numbers without sort function

Answered by : anthony-bliznyuk

a = float(input("Enter a: "))
b = float(input("Enter b: "))
c = float(input("Enter c: "))
if a < b: if b < c: print (a, "<", b, "<", c) else: if a < c: print (a, "<", c, "<", b) else: print (c, "<", a, "<", b)
else: if c < b: print (c, "<", b, "<", a) else: if c < a: print (b, "<", c, "<", a) else: print (b, "<", a, "<", c)

Source : https://stackoverflow.com/questions/65560515/sorting-three-numbers-in-ascending-order-without-using-functions | Last Update : Wed, 11 May 22

Answers related to sort numbers without sort function

Code Explorer Popular Question For C