Program n1; Uses CRT; Const n=5; Var a: array[1..n,1..n] of integer; i,j: integer; k,p: real; begin ClrScr; randomize; p:=1; For i:=1 to n do begin For j:=1 to n do begin a[i,j]:= random(10); write(a[i,j]:2); If (i=j)or(n-i+1=j) then p:=p*a[i,j]; end; writeln; end; k:=sqrt(p); Writeln(k:4:4); readln end.
Program n1;
Uses CRT;
Const n=5;
Var a: array[1..n,1..n] of integer;
i,j: integer; k,p: real;
begin
ClrScr;
randomize;
p:=1;
For i:=1 to n do
begin
For j:=1 to n do
begin
a[i,j]:= random(10);
write(a[i,j]:2);
If (i=j)or(n-i+1=j) then p:=p*a[i,j];
end;
writeln;
end;
k:=sqrt(p);
Writeln(k:4:4);
readln
end.