Uses Crt; var n: longint; i, Col: integer; S: string; begin ClrScr; Write (' n= '); ReadLn (n); Str (n, S); Col:=0; for i:=1 to length (S) do if (S[i]='1') or (S[i]='3') or (S[i]='5') or (S[i]='7') or (S[i]='9') then Col:=Col+1; WriteLn(' Col = ', Col) ; ReadLn; end.
var n: longint;
i, Col: integer;
S: string;
begin
ClrScr;
Write (' n= '); ReadLn (n);
Str (n, S);
Col:=0;
for i:=1 to length (S) do
if (S[i]='1') or (S[i]='3') or (S[i]='5') or (S[i]='7') or (S[i]='9') then
Col:=Col+1;
WriteLn(' Col = ', Col) ;
ReadLn;
end.