program CountNum;
uses
SysUtils;
var
n, i, c: Integer;
s: string;
begin
Write ('Введите N: ');
ReadLn (n);
s := IntToStr (n);
c := 0;
for i := 1 to Length (s) do begin
if StrToInt (s [i]) mod 2 = 0 then
Inc (c);
end;
WriteLn ('Количество четных цифр = ', c);
ReadLn;
end.
program CountNum;
uses
SysUtils;
var
n, i, c: Integer;
s: string;
begin
Write ('Введите N: ');
ReadLn (n);
s := IntToStr (n);
c := 0;
for i := 1 to Length (s) do begin
if StrToInt (s [i]) mod 2 = 0 then
Inc (c);
end;
WriteLn ('Количество четных цифр = ', c);
ReadLn;
end.