Program to find the factors of a number using FUNCTION

DECLARE FUNCTION FACT(N)
CLS
INPUT"ENTER ANY NUMBER";N
PRINT"FACTOR=";FACT(N)
END

FUNCTION FACT(N)
FOR I= 1 TO N
IF N MOD I=0 THEN
PRINT I
NEXT I
END FUNCTION

Comments

Popular posts from this blog

Tihar