Skip to content

Instantly share code, notes, and snippets.

@ernado
Created May 18, 2012 23:20
Show Gist options
  • Select an option

  • Save ernado/2728083 to your computer and use it in GitHub Desktop.

Select an option

Save ernado/2728083 to your computer and use it in GitHub Desktop.
uses
crt;
var
N,i,j:byte;
a: array[1..20,1..20] of integer;
t:integer;
procedure VIVOD;
begin
for i:=1 to N do
begin
for j:=1 to N do
Write(a[i,j]:4);
WriteLn;
end;
end;
begin
ClrScr;
Randomize;
Write('N: '); ReadLn(N);
for i:=1 to N do
for j:=1 to N do
a[i,j] := Random(30)-15;
VIVOD;
for i:=1 to N do
begin
t := a[1,i];
a[1,i] := a[i, 1];
a[i,1] := t;
end;
WriteLn;
VIVOD;
ReadKey;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment