| ||||||||||
| 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 | |||||||||
PASCAL 1ACvar a:array[1..100,1..100]of char;
i,j,l,n,o:integer;
s:string;
begin
readln(n);
while n<>0 do begin
readln(s);
l:=length(s)div n;
o:=1;
for i:=1 to l do
if odd(i) then
for j:=1 to n do begin a[i,j]:=s[o]; inc(o); end
else
for j:=n downto 1 do begin a[i,j]:=s[o]; inc(o); end;
for i:=1 to n do
for j:=1 to l do
write(a[j,i]);
writeln;
readln(n);
end;
end.
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator