даю 35 баллов
Помогите пожалуйста срочно
Ответы
1)Var a: array [1..10] of integer;
pr,i:integer;
begin
pr:=1;
for i:=1 to 10 do
begin
readln(a[i]);
if a[i] mod 7 = 0 then
pr:=pr*a[i];
end;
writeln(pr);
end.
2)Var a: array [1..17] of integer;
count,i:integer;
begin
randomize;
count:=0;
for i:=1 to 17 do
begin
a[i]:=random(21)-10;
writeln(a[i]);
if a[i]>0 then inc(count);
end;
writeln(count);
end.
3)Var a: array of integer;
count,i,n,c:integer;
begin
readln(n);
count:=0;
Setlength(a,n+1);
c:=0;
for i:=1 to n do
begin
readln(a[i]);
if (a[i]>5) and (i mod 2 =0) then
begin
inc(count);
c:=c+a[i];
end;
end;
writeln(c/count);
end.
4)Const N=35;
Var a: array [1..N] of integer;
i:integer;
begin
randomize;
for i:=1 to N do
begin
a[i]:=random(21)-5;
write(a[i]:4);
if (a[i] mod 10 = 5) then a[i]:=0
else a[i]:=1;
end;
writeln;
for i:=1 to N do
write(a[i]:4);
end.