2 marksProgram Checks and Tests
CSEC Information Technology · May/June 2013 · Paper 2 · Question 10(a)(iv)
Consider the provided Pascal program: 1 Program lesser; 2 Var X, Y: integer; 3 4 Begin 5 6 readln(X, Y); 7 If X < Y 8 Then Writeln ('X is the smaller number') 9 Else Writeln ('Y is the smaller number'); 10 End.
State the line number in which the error exists and rewrite the program code that would correct the error.
The mark scheme is shown once you've answered.
Practise this question