Wednesday, October 16, 2019

91. Qbasic Program to display: 1, 121, 12321, 1234321, 123454321

91. Write a sub procedure to display:
1, 121, 12321, 1234321, 123454321
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A# = 1
FOR I = 1 TO 5
PRINT A# ^ 2
A# = A# * 10 + 1
NEXT I
END SUB

6 comments: