|
|
вернуться в форумWHY WA#3 Послано Looser 31 мар 2008 03:18 This my code: var a:array[1..100,0..100] of integer; i,n,k,ki,kj,j,kn:integer; begin readln(n,k); kn:=k; k:=n div k+1; if kn=n then k:=1; ki:=1; kj:=1; for i:=1 to n do begin read(j); a[ki,kj]:=j; inc(a[ki,0]); inc(ki); if ki>k then begin ki:=1; inc(kj); end; end; for i:=1 to k do begin for j:=1 to a[i,0] do write(a[i,j]:4); writeln; end; end. plz help me! Edited by author 31.03.2008 03:19 Re: WHY WA#3 9 3 1 2 3 4 5 6 7 8 9 => 1 4 7 2 5 8 3 6 9 |
|
|