1 CLS
INPUT "N(n<28)-"; n
IF n >= 28 AND n <= 0 THEN GOTO 1
FOR i1 = 1 TO 9
FOR i2 = 1 TO 10
FOR i3 = 1 TO 10
s = i1
d = (i2 - 1)
e = (i3 - 1)
summa = s + d + e
IF summa = n THEN
s = s * 100
d = d * 10
c = s + d + e
PRINT c;
END IF
NEXT i3
NEXT i2
NEXT i1
Тестирование выполнено в программе QB64 ( Скачать )