#include using namespace std; void order(int & x, int & y) // x, y are REFERENCE parameters { if (y < x) { const int orig_x = x; x = y; y = orig_x; } } int main() { int a, b, c, d, e, f; cin >> a; cin >> b; cin >> c; cin >> d; cin >> e; cin >> f; cout << "a = " << a << " "; cout << "b = " << b << " "; cout << "c = " << c << " "; cout << "d = " << d << " "; cout << "e = " << e << " "; cout << "f = " << f << " "; cout << "\n\n"; order(a, b); order(b, c); order(c, d); order(d, e); order(e, f); order(a, b); order(b, c); order(c, d); order(d, e); order(a, b); order(b, c); order(c, d); order(a, b); order(b, c); order(a, b); cout << "a = " << a << " "; cout << "b = " << b << " "; cout << "c = " << c << " "; cout << "d = " << d << " "; cout << "e = " << e << " "; cout << "f = " << f << " "; cout << "\n"; }