3.2 Repetition Structures - Part 1.pdf - ITP3914 –...

  • No School
  • AA 1
  • 25

This preview shows page 1 - 8 out of 25 pages.

ITP3914 Programming Part 3 Basic Program Structures 1 (C) VTC, IVE
Image of page 1
The Structure Theorem states that it is possible to write ANY computer program by using only the three basic control structures: (C) VTC, Prepared by [email protected] 2
Image of page 2
Part 1 The while statement 3 (C) VTC, Prepared by [email protected]
Image of page 3
If the boolean condition evaluates to true , the loop_body is executed . After executing the loop_body , test the condition again. While condition is true , loop_body is executed again and again. When the condition becomes a false , execute next_statement. (C) VTC, Prepared by [email protected] 4 while ( condition ) loop_body ; next_statement; boolean condition loop_body next_statement false true
Image of page 4