Quote
Now I got the code working properly except it displays the smallest interger was -4194932
Here's what I'm working with:
#include <iostream>
using namespace std;
int main()
{
int min;
int max;
int input;
do{
cout << "Enter an integer (-99 to quit): " << endl;
cin >> input;
if(input < min) {
min = input;
}
if(input > max) {
max = input;
}
} while (input != -99);
cout << "The largest integer entered was " << max << endl;
cout << "The smallest integer entered was " << min << endl;
cout << "Cody Carson\n\n";
return 0;
}

New Topic/Question
Reply




MultiQuote




|