Monday, October 21, 2019

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

No comments:

Post a Comment

My journey of Jagat Mandir School

13 Years of ExperiencE It is also said that school is next home of every child. "failing and learning" Teacher are like gods....