#include <iostream>
using namespace std;
int main() {
int input;
int greatest;
int lowest;
cout << "Enter a number from 0 -99. Enter -99 when you are done.\n";
cin >> input;
lowest = input;
greatest = input;
while (input != -99)
{
if (input < lowest )
{
lowest = input;
}
if (input > greatest)
{
greatest = input;
}
cin >> input;
}
cout << "Lowest number is " << lowest << endl;
cout << "Greatest number is " << greatest << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgaW5wdXQ7CglpbnQgZ3JlYXRlc3Q7CglpbnQgbG93ZXN0OwoJCgljb3V0IDw8ICJFbnRlciBhIG51bWJlciBmcm9tIDAgLTk5LiBFbnRlciAtOTkgd2hlbiB5b3UgYXJlIGRvbmUuXG4iOwoJY2luID4+IGlucHV0OwoKCWxvd2VzdCA9IGlucHV0OwoJZ3JlYXRlc3QgPSBpbnB1dDsKCQoJd2hpbGUgKGlucHV0ICE9IC05OSkKCXsKCQlpZiAoaW5wdXQgPCBsb3dlc3QgKQoJCXsKCQkJbG93ZXN0ID0gaW5wdXQ7CgkJfQoJCQoJCWlmIChpbnB1dCA+IGdyZWF0ZXN0KQoJCXsKCQkJZ3JlYXRlc3QgPSBpbnB1dDsKCQl9CgkJCgkJY2luID4+IGlucHV0OwoJCgl9CgkKCWNvdXQgPDwgIkxvd2VzdCBudW1iZXIgaXMgIiA8PCBsb3dlc3QgPDwgZW5kbDsKCWNvdXQgPDwgIkdyZWF0ZXN0IG51bWJlciBpcyAiIDw8IGdyZWF0ZXN0IDw8IGVuZGw7CgkKCXJldHVybiAwOwp9