The __________ is used to code both pretest and posttest loops.

Ngọc Trâm

New member
The __________ is used to code both pretest and posttest loops.
A. Do loop statement
B. For loop statement
C. While loop statement
D. If statement
 
Answer: A
Explanation: The do..loop statement is used to code both pretest and posttest loops. For example,
Pretest:
Code:
Do {While | Until} condition
loop body instructions, which will be processed either
  while the condition is true or until the condition becomes true
Loop
Posttest:
Code:
Do
loop body instructions, which will be processed either
while the condition is true or until the condition becomes true
Loop {While | Until} condition
 

Tìm kiếm

Back
Top