Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Project2;
- {$APPTYPE CONSOLE}
- uses
- SysUtils;
- const
- s=100;
- var
- mass:array [1..s,1..s] of integer;
- i,j,n,m:integer;
- begin
- writeln('Vvedite kol-vo strok i stolbcov: ');
- readln (n,m);
- randomize;
- for i:=1 to n do
- for j:=1 to m do
- begin
- if (i=j) then mass[i,j]:=0
- else
- mass[i,j]:=random(100)-25;
- end;
- for i:=0 to n do
- begin
- for j:=0 to m do
- if (i=0) then
- begin
- write('| ',j,' |');
- end
- else if (j=0) then
- begin
- write('| ',i,' |');
- end
- else if (i<>0) and (j<>0) then
- if (i=j) then
- write('| ',mass[i,j],' |')
- else
- write('|',mass[i,j],'|');
- writeln;
- end;
- readln;
- end.
Add Comment
Please, Sign In to add comment