// File: WhileNoErrorAsk.CPP // AskBeforeIterating; ; Init Using First Value; While Loop // Find the Extremes in a List of integers // Method of Iteration: While loop, conditional #include #include #define False 0 #define True 1 using namespace std; int main() {int Value,Min,Max,ValuesToProcess; char Reply; cout << "Press Y to Enter an Integer. Press N to Abort >"; cin >> Reply; if (toupper(Reply)=='Y') { cout << "Enter the 1st Integer >"; cin >> Value; Max=Min=Value; cout << "Press Y to Enter Another Integer. Press N to Abort >"; cin >> Reply; // Condition is checked immediately after input of reply. Quit if 'N'. while (toupper(Reply)!='N') { cout << "Enter the Next Integer >"; cin >> Value; if (Value>Max) Max=Value; else if (Value"; cin >> Reply; } cout << "Minimum:" << Min << "\tMaximum:" << Max << endl; } return(0); }