// WhileDemo - input a loop count. Loop while // outputting astring nArg number of times. #include #include int main(int nArg, char* pszArgs[]) { // input the loop count int nLoopCount; cout << "Enter nLoopCount: "; cin >> nLoopCount; // now loop that many times while (nLoopCount > 0) { nLoopCount = nLoopCount - 1; cout << "Only " << nLoopCount << " loops to go\n"; } return 0; }