Заменяет в строке
var
s : string;
i, lim : integer;
begin
readln (s);
i := 1;
lim := length (s);
while (i <= lim) do<br> begin
if s[i] in ['1'..'9'] then
begin
if (s[i] = '1') and (i <> length (s)) and (s[i+1] ='0') then
begin
write ('ten');
inc (i);
end
else
case s[i] of
'1' : write ('one');
'2' : write ('two');
'3' : write ('three');
'4' : write ('four');
'5' : write ('five');
'6' : write ('six');
'7' : write ('seven');
'8' : write ('eight');
'9' : write ('nine');
end;
end
else write (s[i]);
inc (i);
end;
end.