Var A:array[1..10000,1..10000] of integer; i,j,N:integer; S,P:real; Begin Randomize; P:=1; Write('N = ');ReadLn(N); For i:= 1 to N do Begin For j:= 1 to N do Begin A[i,j]:=random(21)-10; Write(A[i,j]:3,' ') End; WriteLn End; j:=1; Repeat S:=0; For i:= 1 to N do S:=S+A[i,j]; P:=P*S; j:=j+2; Until j>N; WriteLn('P = ',P); End.
A:array[1..10000,1..10000] of integer;
i,j,N:integer;
S,P:real;
Begin
Randomize;
P:=1;
Write('N = ');ReadLn(N);
For i:= 1 to N do
Begin
For j:= 1 to N do
Begin
A[i,j]:=random(21)-10;
Write(A[i,j]:3,' ')
End;
WriteLn
End;
j:=1;
Repeat
S:=0;
For i:= 1 to N do
S:=S+A[i,j];
P:=P*S;
j:=j+2;
Until j>N;
WriteLn('P = ',P);
End.
N = 7
-8 4 4 6 -6 -3 1
-6 -6 8 7 8 8 2
5 -2 5 7 -4 9 -1
0 10 2 -5 9 9 3
2 8 2 -10 -6 -4 -6
-7 3 -4 9 2 4 -3
6 4 -3 0 1 4 -5
P = 4032