January 3, 2017

Qbasic program to print Fibonacci Series: 1, 4, 5, 9, 14, ....... up to 12th term.

CLS
A = 1
B = 4
PRINT A;
PRINT B;
FOR I = 1 TO 10
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.