Multiple choice technology mainframe

which code snippet can be used to iterate an instruction for 6 times? Note: indicates new line

  1. REPEAT 6 TIMES <n> instruction <n> END-REPEAT

  2. MOVE 1 TO COUNTER <n> PERFORM UNTIL COUNTER = 6 <n> COMPUTE COUNTER = COUNTER + 1 <n> instruction <n> END-PERFORM

  3. PERFORM 6 TIMES <n> instruction <n> END-PERFORM

  4. REPEAT VARYING COUNTER FROM 1 BY 1 UNTIL COUNTER = 6 <n> instruction <n> END-PERFORM

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The correct COBOL syntax for repeating an instruction a fixed number of times is 'PERFORM n TIMES' followed by the instruction and 'END-PERFORM'. Option A uses REPEAT which is not standard COBOL. Option B incorrectly computes counter outside the loop. Option D incorrectly uses REPEAT with VARYING syntax.