DECLARE FUNCTION FACT(N)
CLS
INPUT"ENTER ANY NUMBER";N
PRINT"FACTORIAL NO.=";FACT(N)
END
FUNCTION FACT(N)
F=1
FOR I= 1 TO N
F=F*I
NEXT I
PRINT"FACTORIAL=";F
END SUB
CLS
INPUT"ENTER ANY NUMBER";N
PRINT"FACTORIAL NO.=";FACT(N)
END
FUNCTION FACT(N)
F=1
FOR I= 1 TO N
F=F*I
NEXT I
PRINT"FACTORIAL=";F
END SUB
No comments:
Post a Comment