# Factorial. ( function)


DECLARE FUNCTION FACT(n)
CLS
INPUT " Enter any number ";n
PRINT " factorial =";FACT(n)
END

FUNCTION FACT(n)
F=1
FOR I=1 TO n
F=F*I
NEXT I
FACT=F
END FU

Comments

Popular posts from this blog