What is the purpose of this algorithm?
FOR i ← 1 TO 12
OUTPUT i * 7
NEXT i
- The loop runs 12 times, with i taking the values 1, 2, 3 and so on up to 12.
- Each time, it outputs i multiplied by 7: 7, 14, 21 and so on.
- The last value output is 12 × 7 = 84.
Answer: It outputs the 7 times table, from 1 × 7 = 7 up to 12 × 7 = 84.