DECLARE SUB SERIES()
CLS
CALL SERIES
END
SUB SERIES()
A=1
FOR I=1 TO 20
PRINT A;
A=A+I
NEXT I
END SUB
Same program in little change (without using loop value to generate series)
DECLARE SUB SERIES()
CLS
CALL SERIES
END
SUB SERIES()
A=1
B=1
FOR I=1 TO 20
PRINT A;
A=A+B
B=B+1
NEXT I
END SUB