QBASIC PROGRAM TO FIND SQUARE OF FIRST 50 NATURAL NUMBERS

QBASIC PROGRAM TO FIND SQUARE OF FIRST 50 NATURAL NUMBERS


1,4,9.....2500 OR 50 TH TERM


CLS
 FOR I = 1 TO 50
 PRINT I ^ 2,
 NEXT I
 END

USING SUB


DECLARE SUB SQ()
 CLS
 CALL SQ
 END
 
 SUB SQ
 FOR I = 1 TO 50
 PRINT I ^ 2,
 NEXT I
 END SUB

Post a Comment

0 Comments