WAP to print series 1,8,27,64...50th term

QBASIC program to print cube of first 50 natural numbers



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

USING SUB


DECLARE SUB SERIES
 CLS
 CALL SERIES
 END
 
 SUB SERIES
 FOR I = 1 TO 50
 PRINT I ^ 3,
 NEXT I
 END SUB

Post a Comment

0 Comments