January 3, 2017

Qbasic program to print Fibonacci Series: 2, 2, 4, 6, 10, 16, ....... up to 16th term.

CLS
A = 2
B = 2
PRINT A;
PRINT B;
FOR I = 1 TO 14
C = A + B
PRINT C;
A = B
B = C
NEXT I
END

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.