Use the BASIC program below to answer questions 23 to 25
10 LET K = 2
20 LET L = 9
30 LET SUM = 0
40 FOR J = K TO STEP 2
50 SUM = SUM + J\(^2\)
60 PRINT "ANSWER =", SUM
70 NEXT J
80 END
How many times will the statement lines 50 and 60 be repeated?
a
2
b
3
c
4
d
5
Explanation
Correct Option
cNo explanation available
Video Explanation
No video available
Post your Contribution
Share:
Discussions (4)

Odemosad
2 years ago
The statement lines 50 and 60 will be repeated 4 times.
Here's why:
- The FOR loop (line 40) starts at K (which is 2) and increments by 2 each time (STEP 2).
- The loop will run for J = 2, 4, 6, and 8 (since it stops at L, which is 9).
- The statements inside the loop (lines 50 and 60) will be executed for each of these values of J, so they will be repeated 4 times.


