Fator using sub

Display factor using sub procedure.


DECLARE SUB FACTOR(N)
CLS
INPUT"ENTER ANY NO";N
CALL FACTOR(N)
END

SUB FACTOR(N)
FOR I=1 TO N
IF  N MOD I=0 THEN PRINT I
NEXT I 
END SUB

Comments