Computer GA 2.2 Flashcards
-Is a control structure that allows us to specify the repeated execution of a group of program statements a definite number of times
-A variable that serves as an index or counter is used to indicate how many times an enclosed block of statements is to be executed repeatedly
Counter-Controlled Loops
-The most common type of counter-controlled loop
-Is used when the number of repetitions or iterations is already known before entering the loop
The for Loop
-Is a loop that tests a condition to determine whether a block of enclosed statements should be executed repeatedly
Condition-Controlled Loops
-Is the most common example of a loop structure that uses a pre-test
-Quite similar to a for loop; however, at the start of the loop it merely checks the condition
The while Loop
-Tests the condition at the end of the loop bod
Post-test Loop
-Is the most common example of a loop structure that uses a post-test
The do-while Loop