QBASIC SERIES : 2,3,5,8,13,21,34,55,89,144

QBASIC SERIES : 2,3,5,8,13,21,34,55,89,144


2,3,5,...,144 or upto 10th term


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

USING SUB


DECLARE SUB SERIES()
 CLS
 A = 2
 B = 3
 FOR I = 1 TO 10
 PRINT A;
 C = A + B
 A = B
 B = C
 NEXT I
 END SUB

Post a Comment

0 Comments