Var k:integer; begin read(k); if k=1 then write('один'); if k=2 then write('два'); if k=3 then write('три'); if k=4 then write('четыре'); if k=5 then write('пять'); if k=6 then write('шесть'); if k=7 then write('семь'); if k=8 then write('восемь'); if k=9 then write('девять'); if k=10 then write('десять'); end.
Заменяет в строке var s : string; i, lim : integer; begin readln (s); i := 1; lim := length (s); while (i <= lim) do 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.
k:integer;
begin
read(k);
if k=1 then write('один');
if k=2 then write('два');
if k=3 then write('три');
if k=4 then write('четыре');
if k=5 then write('пять');
if k=6 then write('шесть');
if k=7 then write('семь');
if k=8 then write('восемь');
if k=9 then write('девять');
if k=10 then write('десять');
end.
var
s : string;
i, lim : integer;
begin
readln (s);
i := 1;
lim := length (s);
while (i <= lim) do
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.