INPUT "vvedite nachalo diapazona ", n
INPUT "vvedite konec diapazona ", k
FOR i = n TO k
a = i \ 1000
b = i \ 10 MOD 10
c = i \ 100 MOD 10
d = i MOD 10
IF a = b AND a = c AND a <> d OR a = b AND a = d AND a <> c OR a = c AND a = d AND a <> b OR b = c AND b = d AND b <> a THEN PRINT i;
NEXT
Тестирование выполнено в программе QB64 ( Скачать )