Wednesday, October 16, 2019

110. Qbasic program to display: 1, 0, 1, 1, 2, 3................... upto 10th term.

110. Write a program to display: 1, 0, 1, 1, 2, 3................... upto 10th term.
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END

SUB SERIES ( )
A = 1
B = 0
FOR I = 1 TO 5
PRINT A;
PRINT B;
A = A + B
B = A + B
NEXT I
END SUB

No comments:

Post a Comment