10 REM A SHORT PROGRAM TO CALCULATE FACTORIAL OF
20 REM SUPPLIED NUMBER N
30 INPUT "Please provide N: "; N
35 REM OUTPUT IS NOW A RESERVED KEYWORD
40 OUTPUTVAL = 1
50 FOR I = 1 TO N
60 OUTPUTVAL = OUTPUTVAL * I
70 NEXT I
80 PRINT "Factorial of N is "; OUTPUTVAL
