C++ - Do/While Loop
Overview
Estimated time: 15–25 minutes
Run a loop body at least once and check the condition at the end.
Learning Objectives
- Use do/while for input-driven loops and menus.
Prerequisites
Example
int x;
do {
// read x
} while (x != 0);