// puts two numbers into increasing order // Mikhail Nesterenko // 9/16/99 #include using std::cout; using std::cin; using std::endl; int main() { // read in the numbers cout << "Enter two integers: "; int n1, n2; cin >> n1 >> n2; // put the numbers in increasing order if (n1 > n2) { // swap n1 and n2 const int tmp = n1; n1 = n2; n2 = tmp; } // print the numbers out cout << "Numbers in order: " << n1 << " " << n2 << endl; }