///Geoff Hagopian
///checking math summation formulas

#include "std_lib_facilities.h"

int main() {
    /**1. Write a program that consists of a while-loop that
    (each time around the loop) reads in two ints and then
    prints them. Exit the program when a terminating '|'
    is entered.
    2. Change the program to write out the smaller value is:
    followed by the smaller of the numbers and the larger
    value is: followed by the larger value.
    3. Augment the program so that it writes the line the
    numbers are equal (only) if they are equal.**/
    int x,y;
    cout << "\nEnter two ints:\n";
    while(cin>>x) {
        cin >> y;
        cout << "\nYou entered " << x << " and " << y << endl;

        if(x<y) {
            cout << "\nThe larger is " << y
                 << " and the smaller is " << x;
        }
        else if(x>y)
            cout << "\nThe larger is " << x
                 << " and the smaller is " << y;
        else
            cout << x << " is equal to " << y;
        cout << "\nEnter two ints:\n";
    }
}
