ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

<== Problem 1059: Expression ==> Help! What is wrong with my code?
Posted by William Hong 12 Mar 2002 18:06
Hello all,

program expression;
var i,j:integer;

begin
readln(j);
writeln('0');
for i := 1 to j do begin
writeln('X');
writeln('*');
writeln(i);
writeln('+');
end;
end.

This is my code but i keep getting WA. it gives the correct output so
i don't understand y my code is wrong. Can anyone help me debug my
program or tell me what is wrong with the logic?

Alternatively, if u have AC this question, pls post the solution here.

Thanks a lot