Do/while Structure (L15) * do/while structure * break Statement * continue Statement * Loop...

download Do/while Structure (L15) * do/while structure * break Statement * continue Statement * Loop Programming Techniques - Interactive input within a loop -

If you can't read please download the document

  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    224
  • download

    3

Transcript of Do/while Structure (L15) * do/while structure * break Statement * continue Statement * Loop...

  • 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