Wednesday, October 16, 2019

82. Qbasic program to display 1, 11, 111, 1111, 11111

82. Write a program using sub procedure to print series: 1, 11, 111, 1111, 11111

DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
A = 1
FOR I = 1 TO 5
PRINT A,
A = A * 10 + 1
NEXT I
END SUB

4 comments: