do/while structure (l15) * do/while structure * break statement * continue statement * loop...
Post on 19-Dec-2015
224 views
TRANSCRIPT
- Slide 1
- do/while Structure (L15) * do/while structure * break Statement * continue Statement * Loop Programming Techniques - Interactive input within a loop - Selection within a loop - Evaluating functions of one variable - Interactive loop control * Exercise/Home Work Dr. Ming Zhang
- Slide 2
- General Form of do/while Statement do statement(s); while (condition expression); The process continues until the condition expression evaluates to zero ( false) Dr. Ming Zhang
- Slide 3
- Flowchart of do/while Structure Enter do/while statement Execute the statement(s) after do exit the Loop false do Evaluate the statement expression true Dr. Ming Zhang
- Slide 4
- Example of do/while #include using std::cout; int main( ) { int counter = 1; do { cout