Connect Me

twitterfacebookgoogle plus email

  Instagram View Biwas Bhattarai's profile on LinkedIn

WAP to generate the series: 1,2, 4, 7, 11, 16, 22, 29, 37 till 20th terms

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
Ą
https://www.flickr.com/photos/spklg/15211044551/