#include void order(int & x, int & y) { if (x > y) { int temp = x; x = y; y = temp; } } /* this order(a, b); order(b, c); order(a, b); is enough to get a, b, c in the right order */ void main() { int a, b, c; a = read_int(); b = read_int(); c = read_int(); order(a, b); order(b, c); order(a, b); cout << a << " " << b << " " << c << "\n"; }