Write a qbasic program to display the factorial of an input number.

Write a qbasic program to display the factorial of an input number.


Ans:

CLS
Fact=1
INPUT "Enter a number ";n
FOR j=1 TO n
       Fact=Fact*j
NEXT J
PRINT "Factorial is  ";Fact
END