Wednesday, October 16, 2019

117. Qbasic program to display product of all numbers from 4 to 8.

117. Write a sub program to display product of all numbers from 4 to 8.

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

No comments:

Post a Comment