CSEC Information Technology · May/June 2019 · Paper 1 · Question Q57
Item 57 refers to the following code. sum = 0 count = ? While count < 10 do count = count + 1 Read num sum = sum + num endwhile Printsum If the While loop is to be executed 10 times, what initial value should be stored in count?
- (A)-1
- (B)0
- (C)1
- (D)2
The answer is shown once you've answered.
Practise this question