так что к примеру массив А(10). Program z1; сonst n=10; var a:array[1..n] of integer; i,s,p:integer; begin randomize; For i:=1 to n do begin a[i]:=random (21)-10; write (a[i]:4);end; p:=1; s:=0; For i:=1 to n do begin If 10>a[i]>0 then s:=s+a[i]; p:=p*a[i];end; writeln; writeln('s=',s 'p=',p); end.
Program z1;
сonst n=10;
var a:array[1..n] of integer;
i,s,p:integer;
begin randomize;
For i:=1 to n do begin
a[i]:=random (21)-10;
write (a[i]:4);end;
p:=1; s:=0;
For i:=1 to n do
begin
If 10>a[i]>0 then s:=s+a[i]; p:=p*a[i];end;
writeln;
writeln('s=',s 'p=',p);
end.