Wednesday, October 16, 2019

96. Qbasic Program to print the following series 1, 4, 9, 16.....upto 10th term.

96. Write a program to print the following series by using SUB ……END SUB: 1, 4, 9, 16.....upto 10th term.

DECLARE SUB SERIES ()
CLS
CALL SERIES
END

SUB SERIES
FOR I = 1 TO 9
PRINT I ^ 2
NEXT I
END SUB

No comments:

Post a Comment