Saturday, October 16, 2021

WAP to find factorial of a given number.(USING SUB PROCEDURE)

WAP to find factorial of a given number. (USING SUB PROCEDURE)

DECLARE SUB FACTORIAL (A)

CLS

INPUT ''ENTER A NUMBER'';X 

CALL FACTORIAL (X)

END

SUB FACTORIAL (A)

FOR I = 1 TO A

F = A*I

NEXT I

PRINT "THE FACTORIAL OF A NUMBER IS"; F

END SUB

Click here for more...

No comments:

Post a Comment

Sharkey

Simple way to make website using HTML only.

 A simple way to make a website using HTML only. <!DOCTYPE html> <head>         <title>Document</title> </head...