|
|
back to boardShow all messages Hide all messageshere is my code: I don't know wht's the error ,anyone help me? Const u=['a'..'z']+['A'..'Z']; Var s:string; ch:char; i:integer; Begin read(ch); while not eof do begin s:=''; while (ch in u) and (ord(ch)<>26) do begin s:=s+ch; read(ch); end; for i:=length(s) downto 1 do write(s[i]); while (not (ch in u)) and (ord(ch)<>26) do begin write(ch); read(ch); end; end; End. check whether you output EOF. If you output it you will get WA. I got really angry when I understood that my program didn't work, because I print EOF!!!! |
|
|