CLS
INPUT "vvedite chislo ", n
PRINT "prostye deliteli chisla"; n
FOR i = 2 TO n - 1
k = n MOD i
IF k = 0 THEN
f = 0
FOR j = 2 TO i - 1
IF i MOD j = 0 THEN f = 1
NEXT
IF f = 0 THEN PRINT i;
END IF
NEXT
CLS
INPUT "vvedite chislo ", n
PRINT "prostye deliteli chisla"; n
FOR i = 2 TO n - 1
k = n MOD i
IF k = 0 THEN
f = 0
FOR j = 2 TO i - 1
IF i MOD j = 0 THEN f = 1
NEXT
IF f = 0 THEN PRINT i;
END IF
NEXT