To Find the Factors of Given Number.
- CLS
INPUT "Enter any number"; n
FOR i = 1 TO n
x = n MOD i
IF x = 0 THEN
PRINT i;
END IF
NEXT i
END
- DECLARE SUB factor ()
COMMON SHARED n
CLS
CALL factor
END
SUB factor
INPUT "Enter any number"; n
FOR i = 1 TO n
x = n MOD i
IF x = 0 THEN
PRINT i;
END IF
NEXT i
END SUB