var
C,count:integer;
begin
write('Введите число ');
count := 0;
readln(C);
while C <> 0 do
begin
if (C mod 3) = 0 then
inc(count);
write('Введите число ');
readln(C);
end;
writeln('Count = ',count);
readln;
end.
//вторая программа
var
C, Summ:integer;
begin
write('C = ');
Summ := 0;
readln(C);
while C <> 0 do
begin
if (C mod 10) < 5 then
inc(Summ, C mod 10);
C := C div 10;
end;
writeln('Summ = ',Summ);
readln;
end.