Встречаются ли в тексте четные цифры — Pascal(Паскаль)

uses crt;
var
a:set of Char;
i,k:Integer;
s:string;

begin
k:=0;
write('Enter string');
Readln(s);
a:=['2','4','6','8'];
for i:=1 to Length(s) do
if s[i] in a then inc(k);
if k<>0 then write('YEs') else write ('No');
Readln;
end.

Leave a Comment

6 + 2 =