Wednesday, October 16, 2019

100. Qbasic Program to display 5, 10, 20, 35, 55.........upto 10th term.

100. Write a program to display 5, 10, 20, 35, 55.........upto 10th term.
DECLARE SUB DISP( )
CLS
CALL DISP
END
SUB DISP ()
A = 5
B = 5
FOR I = 1 TO 10
    PRINT A
    A = A + B
    B = B + 5
NEXT I
END SUB

1 comment: