Wednesday, October 16, 2019

98. Qbasic program to display the following series: 999, 728, 511.........upto 10th term

98. Write a display the following series: 999, 728, 511.........upto 10th term.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
a = 999
b = 271
c = 54
FOR i = 1 TO 10
    PRINT a
    a = a - b
    b = b - c
    c = c - 6
NEXT i
END SUB

No comments:

Post a Comment