Tuesday, October 1, 2019

Wap to find factorial of given no.

DECLARE FUNCTION factorial (n)
CLS
INPUT "Enter a number"; n
PRINT "The factorial of the given number is"; factorial(n)
END

FUNCTION factorial (n)
f = 1
FOR i = 1 TO n
    f = f * i
NEXT i
factorial = f

END SUB

No comments:

Post a Comment

Experience of COVID-19 and the cancellation of SEE.

As we know, that this pandemic disease has started from the Wuhan district of China. This viruswvirus discovered out on 31st December 2019 ...