|
|
вернуться в форумcan anybody give me examples,please my prog but I get WA #4 var s : string; PRocedure get(s : string); var i,j :longint; t : string; begin i:=1; while not(s[i] in ['A'..'Z','a'..'z']) do begin write(s[i]); inc(i); end; while (i<=length(s))and(i<256) do begin t:=''; while (s[i] in ['A'..'Z','a'..'z'])and(i<=length(s))and(i<256) do begin t:=t+s[i]; inc(i); end; for j:=length(t) downto 1 do write(t[j]); while not(s[i] in ['A'..'Z','a'..'z'])and(i<=length(s)) do begin write(s[i]); inc(i); end; end; writeln; end; Procedure init; Begin while not(seekeof(input)) do begin readln(s); get(s); end; end; begin init; end. Re: can anybody give me examples,please try this test:"?!?!?" the line can contain only symbols without words |
|
|