Multiple choice technology mainframe

WS-COUNT PIC 9 VALUE 1... PERFORM UNTIL WS-COUNT >= 2 DISPLAY WS-COUNT ADD +1 TO WS-COUNTEND-PERFORMWhat will be the output?

  1. 9

  2. 2

  3. 1

  4. 1, 2

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

The PERFORM loop displays WS-COUNT BEFORE incrementing it. Initial value is 1, condition is WS-COUNT >= 2 (false for 1), so it enters loop, displays 1, then adds 1 (becomes 2). Next iteration checks condition: 2 >= 2 is true, so loop exits. Only 1 is displayed. The loop structure ensures display happens first, then increment.