Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Why I got PE all the time? Could someone look over my code?const yy :set of char=['A','E','I','O','U']; var q,a :string; i :longint; begin readln(q); while q[1]=' ' do delete(q,1,1); while q[length(q)]=' ' do delete(q,length(q),1); a:=''; for i:=1 to length(q) do case q[i] of ' ':if a[length(a)]<>' ' then a:=a+' '; '.',',','?':if a[length(a)]=' ' then a[length(A)]:=q[i] else a:=a+q[i]; else if not (q[i] in yy) and (pos(q[i],a)=0) then a:=a+q[i]; end; writeln(a); end. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator