Wednesday 30 October 2019

Qbasic to find Factorial using Function

DECLARE FUNCTION Factorial ( N )
CLS
INPUT "Enter any number"; N

PRINT "Factorial ="; Factorial ( N )
END

FUNCTION Factorail ( N )
F = 1
F = F * I
NEXT I
Factorail = F
END FUNCTION

No comments:

Post a Comment