Cod sursa(job #363720)

Utilizator lsorin_94Lodoaba Sorin lsorin_94 Data 14 noiembrie 2009 12:54:52
Problema Tablete Scor 10
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.61 kb
program tablete;
type mat=array [1..1000,1..1000] of longint;
var i,j,n,l,k:longint;
    a:mat;
    f,t:text;
begin
  assign(f,'tablete.in');
  reset(f);
  assign(t,'tablete.out');
  rewrite(t);
  {-------------------------------}
  l:=0;
  read(f,n,k);
  if (n mod 2=0) and (k mod 2=0) then
    for i:=1 to n do
     for j:=1 to n do
       begin
         l:=l+1;
         a[i,j]:=l;
       end
  else
  begin
  end;
  {-------------------------------}
  for i:=1 to n do
    begin
      for j:=1 to n do
        write(t,a[i,j],' ');
      writeln(t);
    end;
  close(t);
  close(f);
end.