Wednesday, October 16, 2019

112. Qbasic program to generate series 2, 2,4,6,10,16,……..10th terms

112. Write a program to generate series 2, 2,4,6,10,16,……..10th terms
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES ( )
A = 2
B = 2
FOR I = 1 TO 10
PRINT A;
C = A + B
A = B
B = C
NEXT I
END SUB

1 comment: