DIM ch AS STRING, pov AS STRING, f AS DOUBLE
10 CLS
LINE INPUT "[ENTER - EXIT] Vvedite chislo:", ch
' Proverka vvoda
IF LEN(ch) = 0 THEN END
Notval = 0
FOR i = 1 TO LEN(ch)
p$ = MID$(ch, i, 1)
IF ASC(p$) < 48 OR ASC(p$) > 57 THEN Notval = 1: EXIT FOR
NEXT
IF Notval = 1 GOTO 10
f = VAL(ch)
IF (INT(f) - f) <> 0 GOTO 10
' Vichislenie
FOR iy = 1 TO LEN(ch): FOR ix = 1 TO LEN(ch)
' Sovpadenie
IF iy <> ix AND MID$(ch, ix, 1) = MID$(ch, iy, 1) THEN
' Proverka shablona
PovEx = 0
IF LEN(pov) > 0 THEN
FOR pv = 1 TO LEN(pov)
IF MID$(ch, ix, 1) = MID$(pov, pv, 1) THEN PovEx = 1
NEXT
END IF
' Zapis v shablon
IF PovEx = 0 THEN pov = pov + MID$(ch, ix, 1)
END IF
NEXT
NEXT
' Vivod rezultata
IF pov <> "" THEN pov = ": " + pov
IF pov = "" THEN pov = " otsutstvuyt"
PRINT "Odinakoviye cifry" + pov
END
Тестирование выполнено в программе QB64 ( Скачать )