QBASIC PROGRAM TO PRODUCT OF ALL NUMBERS FROM 4 TO 8

QBASIC PROGRAM TO PRODUCT OF ALL NUMBERS FROM 4 TO 8



CLS
 P = 1
 FOR I = 4 TO 8
 P = P * I
 NEXT I
 PRINT “PRODUCT OF ALL NUMBERS FROM 4 TO 8”; P
 END


DECLARE SUB PRODUCT()
 CLS
 CALL PRODUCT
 END
 
 SUB PRODUCT
 P = 1
 FOR I = 4 TO 8
 P = P * I
 NEXT I
 PRINT “PRODUCT OF ALL NUMBERS FROM 4 TO 8”; P
 END SUB

Post a Comment

0 Comments