1)
program next;
var a,s,d,f,g,h:integer;
begin
read(h);
for a:=1 to h do
read(d);
if (d mod 4 =0)then
f:=f+1;
end;
writeln(f);
end.
2)
if (d mod 6 =0)then
f:=f+d;
3)
for a:=1 to 1000 do
if d=0 then
break;
if (d>9)and(d<100)then
if (d mod 5 =0)then
4)
var a,d,f,g,h:integer;
s:real;
if (d>0)then
if (d mod 8 =0)then
h:=h+1;
if (h>0)then
s:=f/h;
writeln(s);
end
else
writeln('0');
Объяснение:
1)
program next;
var a,s,d,f,g,h:integer;
begin
read(h);
for a:=1 to h do
begin
read(d);
if (d mod 4 =0)then
begin
f:=f+1;
end;
end;
writeln(f);
end.
2)
program next;
var a,s,d,f,g,h:integer;
begin
read(h);
for a:=1 to h do
begin
read(d);
if (d mod 6 =0)then
begin
f:=f+d;
end;
end;
writeln(f);
end.
3)
program next;
var a,s,d,f,g,h:integer;
begin
for a:=1 to 1000 do
begin
read(d);
if d=0 then
begin
break;
end;
if (d>9)and(d<100)then
begin
if (d mod 5 =0)then
begin
f:=f+1;
end;
end;
end;
writeln(f);
end.
4)
program next;
var a,d,f,g,h:integer;
s:real;
begin
for a:=1 to 1000 do
begin
read(d);
if d=0 then
begin
break;
end;
if (d>0)then
begin
if (d mod 8 =0)then
begin
h:=h+1;
f:=f+d;
end;
end;
end;
if (h>0)then
begin
s:=f/h;
writeln(s);
end
else
begin
writeln('0');
end;
end.
Объяснение: