Program PAS; Const N = 10; Var A:array[1..N] of integer; i:integer; S,P:real; Begin S:=0; P:=1; Randomize; Write('Исходный массив:'); For i:= 1 to N do Begin A[i]:=random(21)-10; Write(' ',A[i]); S:=S+A[i]; P:=P*A[i]; End; WriteLn; WriteLn('Sr = ',S/N); WriteLn('P = ',P); End.
Const
N = 10;
Var
A:array[1..N] of integer;
i:integer;
S,P:real;
Begin
S:=0;
P:=1;
Randomize;
Write('Исходный массив:');
For i:= 1 to N do
Begin
A[i]:=random(21)-10;
Write(' ',A[i]);
S:=S+A[i];
P:=P*A[i];
End;
WriteLn;
WriteLn('Sr = ',S/N);
WriteLn('P = ',P);
End.