// File: WhileLoopFunctionsAsk.cpp // AskBeforeIterating; Functions; Init Using First Value; While Loop // Find the Extremes in a List of integers // Method of Iteration: While loop, conditional // NOTE: Runs only in VC++ #include // Note inclusions required to use GetChoice Routine... // Also need ctype.h to use the toupper() routine #include #include #include #define False 0 #define True 1 using namespace std; // Input and Return a Character within a specified set char GetChoice(char *,char *); int main() {int Value,Min,Max,ValuesToProcess; char Reply; Reply=GetChoice("YN","Press Y to Enter an Integer. Press N to Abort\n"); if (toupper(Reply)=='Y') { cout << "Enter the 1st Integer >"; cin >> Value; Max=Min=Value; Reply=GetChoice("YN","Press Y to Enter Another Integer. Press N to Abort\n"); // 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