Wednesday, October 16, 2019

99. Qbasic program to display 315, 270, 215, 150 ........ upto 10th term.

99. Write a program to display 315, 270, 215, 150 ........ upto 10th term.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
a = 315
b = 45
FOR i = 1 TO 10
    PRINT a
    a = a - b
    b = b + 10
NEXT i
END SUB

No comments:

Post a Comment