Question 1
EasyWhat will be printed by the following pseudocode?
Integer a = 0
for (each i from 1 to 5)
a = a + i
end for
Print a
Enter a number as the answer.
Show answer and explanation
Answer: 15
The loop adds 1 + 2 + 3 + 4 + 5 to a, giving 15.