1 REM https://rosettacode.org/wiki/Factors_of_an_integer 10 LET n = 1234 15 PRINT "the factors of "; n; " are "; 20 LET a = ABS(n) 30 LET i = i + 1 40 IF a <> INT(a / i) * i THEN 60 50 PRINT i; " "; 60 IF i < INT(a / 2) THEN 30 70 PRINT a; " ";
Return to Example Index