Wednesday, October 16, 2019

108. Qbasic program to display 1,2,3,5,8……………….13th terms.

108. Write a program to display  1,2,3,5,8……………….13th terms.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END

SUB SERIES ( )
A = 1
B = 2
FOR I = 1 TO 13
PRINT A;
C = A + B
A = B
B = C
NEXT I
END SUB

2 comments: