CSEC Information Technology · May/June 2018 · Paper 1 · Question Q53
Item 53 refers to the following statements. (1) PRINT "ENTER an integer" (2) READ n (3) While n <> -1 DO (4) n = n - 1 (5) Print n (6) Endwhile Which of the following series of numbers represents the correct output when the number 3 is input?
- (A)2, 1, 0
- (B)2, 1, 0, -1
- (C)2, 1, 0, -2
- (D)3, 1, 0, -1
The answer is shown once you've answered.
Practise this question