Wednesday, October 30, 2019

QBASIC PROGRAMMING #7 ( to display -------- )

To Display the Multiplication Table

CLS
INPUT "Enter any number"; N
FOR I = 1 TO 10
PRINT N; "X"; I; "="; N * I
NEXT I
END


To Display the Factorial of any number

CLS
INPUT "Enter any number"; N
F =1
FOR I = 1 TO N
F = F * I
NEXT I
PRINT "Factorial="; F

END

No comments:

Post a Comment