cs201 - repetition loops. types of loops counting loop (while, for) sentinel-controlled loop (while,...

Download CS201 - Repetition loops. Types Of Loops Counting Loop (while, for) Sentinel-Controlled Loop (while, for) Endfile-Controlled Loop (while, for) Input Validation

Post on 19-Dec-2015

213 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • Slide 1
  • CS201 - Repetition loops
  • Slide 2
  • Types Of Loops Counting Loop (while, for) Sentinel-Controlled Loop (while, for) Endfile-Controlled Loop (while, for) Input Validation Loop (do-while) General Conditional Loop (while, for)
  • Slide 3
  • While Loop (same as Java) while (condition) { Do Something } When condition is true, Do Something and return to while. When condition is false, skip and exit loop. i = 0; while ( i

Recommended

View more >