The
while
Statement
•
WhileStatement
While (Expression)
Statement
•
Example:
while
(inputVal != 25)
cin >> inputVal;
•
If the expression has a value of false, the program
skips the loop body and execution continues at the
statement immediately following the loop.