CLS

INPUT "ENTER ANY NUMBER"; N

PRINT "PRIME FACTORS OF"; N; "=";

FOR I = 1 TO N

C = 0

FOR J = 1 TO I

IF I MOD J = 0 THEN C = C + 1

NEXT J

IF N MOD I = 0 AND C = 2 THEN PRINT I;

NEXT I

END

USING SUB PROCEDURE

DECLARE SUB FACT (N)

CLS

INPUT "ENTER ANY NUMBER"; N

CALL FACT (N)

END

SUB FACT (N)

PRINT "PRIME FACTORS OF"; N; "=";

FOR I = 1 TO N

C = 0

FOR J = 1 TO I

IF I MOD J = 0 THEN C = C + 1

NEXT J

IF N MOD I = 0 AND C = 2 THEN PRINT I;

NEXT I

END SUB

## No Comments