... 5.9 uses a do
…while
to output the numbers 1–10.
Line 7 declares and initializes control variable counter
. Upon entering the do
…while
statement, line 10 outputs counter
’s value and line 11 increments counter
. Then the program evaluates the loop-continuation test at the bottom of the loop ...
Get C++ How to Program, 10/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.