Qbasic program to print square of first 9 natural numbers
1,4,9...81
CLS
FOR I = 1 TO 9
PRINT I ^ 2
NEXT I
END
USING SUB
DECLARE SUB SQUARE()
CLS
CALL SQUARE
END
SUB SQUARE
FOR I = 1 TO 9
PRINT I ^ 2
NEXT I
END SUB
1,4,9...81
CLS
FOR I = 1 TO 9
PRINT I ^ 2
NEXT I
END
DECLARE SUB SQUARE()
CLS
CALL SQUARE
END
SUB SQUARE
FOR I = 1 TO 9
PRINT I ^ 2
NEXT I
END SUB
0 Comments