QBASIC SERIES : 1,4,7,10......12th TERM

WAP TO GENERATE THE SERIES : 1,4,7...12TH TERM



CLS
 A = 1
 FOR I = 1 TO 12
 PRINT A;
 A = A + 3
 NEXT I
 END

USING SUB


DECLARE SUB SERIES()
 CLS
 CALL SERIES
 END
 
 SUB SERIES
 A = 1
 FOR I = 1 TO 12
 PRINT A;
 A = A + 3
 NEXT I
 END SUB

Post a Comment

0 Comments