Program n1; var a: array[1..12] of integer; k,i: integer; p: real; begin randomize; k:=0; p:=1; write('исходный массив: '); for i:=1 to 12 do begin a[i]:=random(21)-10; write(a[i],' '); if (a[i]<0) and (a[i] mod 3=0) then k:=k+1; if (a[i]<10) and (a[i]>0) then p:=p*a[i]; end; writeln; writeln(k); writeln(p); end.
Answers & Comments
Verified answer
Program n1;var a: array[1..12] of integer;
k,i: integer;
p: real;
begin
randomize;
k:=0;
p:=1;
write('исходный массив: ');
for i:=1 to 12 do
begin
a[i]:=random(21)-10;
write(a[i],' ');
if (a[i]<0) and (a[i] mod 3=0) then k:=k+1;
if (a[i]<10) and (a[i]>0) then p:=p*a[i];
end;
writeln;
writeln(k);
writeln(p);
end.