QBASIC PROGRAM TO DISPLY 1,1,2,3,5,8......UP TO 1O TERM USING SUB.
DECLARE SUB SERIES()
CLS
CALL SERIES()
END
SUB SERIES()
A=1
B=1
FOR I=1 TO 5
PRINT A
PRINT B
A=A+B
B=A+B
NEXT I
END SUB
DECLARE SUB SERIES()
CLS
CALL SERIES()
END
SUB SERIES()
A=1
B=1
FOR I=1 TO 5
PRINT A
PRINT B
A=A+B
B=A+B
NEXT I
END SUB
Comments
Post a Comment