Practice
LoopsCoreO Level 2210

Total five marks

FOR loop practice for IGCSE and O Level: read five marks and output their total.

A teacher records five marks.

Write pseudocode that reads five integer marks and outputs their total.

Your program should

  • Use a FOR loop that runs exactly five times.
  • Initialise the total to 0 before the loop.
  • Output the total after the loop.

Sample input

10
20
30
40
50

Sample output

150

Starter

Pseudocode
// Read five marks with a FOR loop and output the total.
DECLARE Index : INTEGER
DECLARE Mark : INTEGER
DECLARE Total : INTEGER