Wednesday, October 16, 2019

109. Qbasic program to display 5, 10, 15, 25, 40, 65, 105 ......up to 10th term

109. Write a program to display  5, 10, 15, 25, 40, 65, 105 ......up to 10th term
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END

SUB SERIES ( )
A = 25
B = 40
FOR I = 1 TO 10
PRINT A;
C = A + B
A = B
B = C
NEXT I
END SUB

4 comments: