1.
var a,k: integer;
begin
k:=0;
readln(a);
while a<>0 do
begin
if a mod 4 = 0 then k:=k+1;
readln(a);
end;
writeln('k = ',k);
end.
Пример:
5
20
24
0
k = 2
2.
var a,k: integer;
begin
k:=0;
readln(a);
while a<>0 do
begin
if (a>9)and(a<100)and(a mod 10 = 4) then k:=k+1;</p>
readln(a);
end;
writeln('k = ',k);
end.
Пример:
5
20
24
204
4
0
k = 1