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

Discussion of Problem 1601. AntiCAPS

i WA in test#2, need help at once!PASCAL
Posted by williamljb 19 Feb 2009 10:44
here is my code:
program p1601;
var
  a:array[1..10000]of char;
  i,j,k,n,m,l:longint;
begin
  while not eof(input) do
    begin
      fillchar(a,sizeof(a),' ');
      l:=0;
      while not eoln(input) do
        begin
          inc(l);
          read(a[l]);
        end;
      for i:=2 to l do
        if a[i] in['A'..'Z','a'..'z'] then
        if a[i-1] in ['.','!','?']
          then upcase(a[i])
          else
            if a[i] in['A'..'Z']
              then a[i]:=chr(ord(a[i])+32);
      for i:=1 to l do
        write(a[i]);
      writeln;
      readln;
    end;
end.

Could you give me some tests that tell me why I am wrong?
Thanks a lot!