Ok, I'm sorry I didn't copy all my code into there.
I'll fix that below, but I'm a little confused, what you said to do seems to me to be exactly what I did, except that I set number=0 which I will take out.
Code:
int main()
{
float number, min, max; // float varialbes
//below is a description/explanation of the program
cout << "Enter number after number into this program for as long as ";
cout << "you would like." << endl;
cout << "When you are done enter -99 and the program ";
cout << "will display the smallest and" << endl;
cout << "largest values you entered." << endl;
cout << ": ";
number = max; //initial value of max
number = min; //initial value of max
do //do while loop for the program and figuring max and min
{
cin >> number;
if (number == -99)
break;
if (number > max)
max=number;
else if (number < min)
min=number;
}while (number != -99 ); //loop for every value except for -99
cout << "The largest value is: " << max << endl; //display largest
cout << "The smallest value is: " << min << endl; //display smallest
getch();
return 0;
}