CLS
PRINT "write number N<1000"
INPUT n$
lengh = LEN(n$)
IF lengh = 2 THEN n$ = "0" + n$
IF lengh = 1 THEN n$ = "00" + n$
PRINT n$
ch$ = MID$(n$, 1, 1)
SELECT CASE ch$
CASE "0": PRINT " ";
CASE "1": PRINT "CTo";
CASE "2": PRINT "Dvesti";
'и так до 9
END SELECT
PRINT " ";
ch$ = MID$(n$, 2, 1)
SELECT CASE ch$
CASE "0": PRINT "";
CASE "1": flag = 1
CASE "2": PRINT "DvadcaTb";
'и так до 9
END SELECT
PRINT " ";
ch$ = MID$(n$, 3, 1)
IF flag = 1 THEN GOTO 10
SELECT CASE ch$
CASE "0": PRINT "";
CASE "1": PRINT "Odin";
CASE "2": PRINT "Dva";
'и так до 9
END SELECT
END
10
SELECT CASE ch$
CASE "0": PRINT "DeCiaTb";
CASE "1": PRINT "OdinnadcaTb";
CASE "2": PRINT "DvennadcaTb";
' и так до 9
END SELECT
END
Тестирование выполнено в программе QB64 ( Скачать )