Program zadacha;varA: array[1..8] of integer;i,kolvo_pol,proiz_otr: integer;beginfor i:=1 to 8 do read(A[i]);kolvo_pol:=0;proiz_otr:=1; for i:=1 to 8 do beginif A[i]>0 then kolvo_pol:=kolvo_pol+1;end;writeln();writeln('kolvo_pol = ', kolvo_pol); for i:=1 to 8 do beginif A[i]<0 then proiz_otr:=proiz_otr*A[i];end;writeln('proiz_otr= ', proiz_otr);end.
program zadacha;varC: array[1..10] of integer;i: integer;beginfor i:=1 to 10 do read(C[i]);writeln(); for i:=1 to 10 do beginif C[i]>0 then C[i]:=sqr(C[i]);end; for i:=1 to 10 do beginif C[i]<0 then C[i]:=20;end; for i:=1 to 10 do write(C[i]:6);end.
program max_elementarray ;
var i, max : integer ;
a : array [1..10] of integer;
begin
for i : = 1 to 10 do
begin
readln(a[i]);
end;
max : = a[1];
for i : = 2 to 10 do
if a[i]> max then max : = a[i];
writeln('max element of array = ',max) ;
readln ;
end.
for i:=1 to 8 do beginif A[i]>0 then kolvo_pol:=kolvo_pol+1;end;writeln();writeln('kolvo_pol = ', kolvo_pol);
for i:=1 to 8 do beginif A[i]<0 then proiz_otr:=proiz_otr*A[i];end;writeln('proiz_otr= ', proiz_otr);end.
program zadacha;varC: array[1..10] of integer;i: integer;beginfor i:=1 to 10 do read(C[i]);writeln();
for i:=1 to 10 do beginif C[i]>0 then C[i]:=sqr(C[i]);end;
for i:=1 to 10 do beginif C[i]<0 then C[i]:=20;end;
for i:=1 to 10 do write(C[i]:6);end.