Latest Articles

WAP to find the Factorial of a given number

Question:
Write a program to find the factorial of a given number.


Ans:

      INPUT "Enter the number :::" ; n

      f = 1

      For i  = 1 TO n

      f = f * i

      NEXT I

      PRINT "Factorial of the given number = " ; f

      END


Ans in Image: