#include <iostream>
using namespace std;
int main ()
{
//variables
int num = 0;
int lowNum = 9999; //initialize to some random high number
int highNum = -9999; //" " " " " " low number
//do this code repeatedly
do{
cout<<"Please enter a number: ";
cin>>num;
if(num == -99){break;} //(if the user enters -99, break out of loop.. we don't want it to count
if(num < lowNum) {lowNum = num;} //if the number entered is lower than the lowest, make it the new lowest
if(num > highNum){highNum = num;}
}
//while the condition is true
while (num != -99);
cout<<"The lowest number was: "<<lowNum<<endl;
cout<<"The highest number was: "<<highNum<<endl;
return 0;
}
![[image loading]](http://img269.imageshack.us/img269/6641/cpphelptlnet.jpg)
I hope this helps.