|
|
|
The do statement is a loop that executes statement, then tests expression. The loop iterates while expression is true and ends if expression is false. The loop body always executes at least once. Exampledo {
cout << "Number: ";
if (cin >> num)
data.push_back(num);
} while(cin);
See Alsobreak, continue, expression, for, statement, while, Chapter 4 |
|
|
|