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 Which of the following best...

Toets: WAEC SSCE - Computer Studies - 2016 (Objective) Vak: Computer Studies

Vraag 1 Verslag

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

Which of the following best represents the sequence of output from the program?

Which of the following best represents the sequence of output from the program?

Antwoorddetails
The program is adding 2 to the square of each even number from 2 to 8 and printing the result. The even numbers from 2 to 8 are 2, 4, 6, and 8. The square of each of these numbers are 4, 16, 36, and 64 respectively. Adding 2 to each of these squares gives 6, 18, 38, and 66. Therefore, the program will output: 4, 18, 38, 66. The option that best represents this sequence of output is: 4, 20, 56, 120.

Download de app in de Google Playstore

Alles wat je nodig hebt om uit te blinken in JAMB, WAEC en NECO.

Green Bridge CBT Mobile App
Persoonlijke AI Leerchat Assistent
Meer dan 200.000 IGCSE-, JAMB-, WAEC- en NECO-examenvragen.
Meer dan 1200 lesnotities
Offline ondersteuning - Leer altijd en overal
Dienstregeling Groene Brug
Literatuursamenvattingen & Potentiële Vragen
Volg je prestaties en vooruitgang.
Diepgaande Uitleg voor Uitgebreid Leren