REM To find the product of first n natural numbers (Qbasic Code)
CLS
INPUT "Enter the number"; n
p = 1
FOR i = 1 TO n
p = p * i
NEXT i
s = n!
PRINT "The product upto"; n; "="; p
END
CLS
INPUT "Enter the number"; n
p = 1
FOR i = 1 TO n
p = p * i
NEXT i
s = n!
PRINT "The product upto"; n; "="; p
END