#include using namespace std; void order(int & x, int & y) { if (x < y) return; int temp = x; x = y; y = temp; } int main() { int a[6], i; cout << "Enter the varibales' values: "; i = 0; while (i < 6) { cin >> a[i]; i += 1; } i = 0; while (i <= 4) { order(a[i], a[i+1]); i += 1; } i = 0; while (i <= 3) { order(a[i], a[i+1]); i += 1; } i = 0; while (i <= 2) { order(a[i], a[i+1]); i += 1; } i = 0; while (i <= 1) { order(a[i], a[i+1]); i += 1; } i = 0; while (i <= 0) { order(a[i], a[i+1]); i += 1; } i = 0; while (i < 6) { cout << a[i] << " "; i += 1; } cout << "\n"; }