You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('') and can be up to 35 characters long.
27 lines
860 B
27 lines
860 B
#include <iostream>


#define ZERO 0


#include <climits>


int main()


{


using namespace std;


short sam = SHRT_MAX;


unsigned short sue = sam;


cout << "Sam has " << sam << " dolloars and Sue has " << sue;


cout << " dollars deposited." << endl


<< "Add $1 to each account." << endl


<< "Now ";


sam = sam + 1;


sue = sue + 1;


cout << "Sam has " << sam << " dolloars and Sue has " << sue;


cout << " dollars deposited.\nPoor Sam!" << endl;


sam = ZERO;


sue = ZERO;


cout << "Sam has " << sam << " dolloars and Sue has " << sue;


cout << " dollars deposited." <<endl;


cout << "Take $1 from each account." <<endl <<"Now ";


sam = sam 1;


sue = sue 1;


cout << "Sam has " << sam << " dolloars and Sue has " << sue;


cout << " dollars deposited." <<endl << "Lucky Sue!" <<endl;


return 0;


}
