the series 55555,5555,555,55,5 + OTHERS
201. WAP to generate the series 55555,5555,555,55,5.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 55555
FOR I = 1 TO 5
PRINT A;
A = A \ 10
NEXT I
END SUB
202. WAP to generate the series 1,2,3,5…………9th terms.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 1
B = 2
FOR I = 1 TO 9
PRINT A;
C = A + B
A = B
B = C
NEXT I
END SUB
203. WAP to generate the series 2,2,4,6,10………….13th term.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 2
B = 2
FOR I = 1 TO 13
PRINT A;
C = A + B
A = B
B = C
NEXT I
END SUB
204. WAP to generate the series 3,10,5,16………………11th term.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 3
FOR I = 1 TO 11
PRINT A;
IF A MOD 2 = 0 THEN
A = A \ 2
ELSE
A = A * 3 + 1
END IF
NEXT I
END SUB
205. WAP to generate 7,22,11,34……………19th terms.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 7
FOR I = 1 TO 10
PRINT A;
IF A MOD 2 = 0 THEN
A = A \ 2
ELSE
A = A * 3 + 1
END IF
NEXT I
END SUB
206. WAP to generate the series10,12,15,19…………..14th terms.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 10
B = 2
FOR I = 1 TO 14
PRINT A
A = A + B
B = B + 1
NEXT I
END SUB
207. WAP to generate the series 50,46,41,35…………..7th terms.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 50
B = 4
FOR I = 1 TO 7
PRINT A
A = A - B
B = B + 1
NEXT I
END SUB
208. WAP to generate the series .1,0.01,0.001,0.0001,0.00001
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 1
FOR I = 1 TO 5
PRINT A / 10 ^ I
NEXT I
END SUB
209. WAP to generate the series 0.00003,0.0003,,0.003,0.03,0.3.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = .00003
FOR I = 1 TO 5
PRINT A
A = A * 10
NEXT I
END SUB
210. WAP to display numbers 1,3,5……..30.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 30 STEP 2
PRINT I,
NEXT I
END SUB
211. WAP to display numbers 70,61,52…..7
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
FOR I = 70 TO 7 STEP -9
PRINT I
NEXT I
END SUB
212. WAP to generate the following series 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
213. WAP to generate the following series 11111,1111,111,11,1.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 11111
FOR I = 1 TO 5
PRINT A
A = A \ 10
NEXT I
END SUB
214. WAP to display 3,6,12,24………15th terms.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 3
FOR I = 1 TO 15
PRINT A
A = A * 2
NEXT I
END SUB
215. WAP to display -30,-20,-10,0,10,……………20th terms.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = -30
FOR I = 1 TO 20
PRINT A,
A = A + 10
NEXT I
END SUB
216. WAP to generate the following series 5,55,555,5555,55555.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 5
FOR I = 1 TO 5
PRINT A,
A = A * 10 + 5
NEXT I
END SUB
217. WAP to display numbers 30,28.5,27,25.5…….9th terms.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 30
FOR I = 1 TO 9
PRINT A,
A = A – 1.5
NEXT I
END SUB
218. WAP to generate the series 1,5.25,125…..10th terms.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
A = 1
FOR I = 1 TO 10
PRINT A,
A = A * 5
NEXT I
END SUB
219. WAP using to display 50,75,100,125,150.
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
FOR I = 50 TO 150 STEP 25
PRINT I,
NEXT I
END SUB
220. WAP using to display 1, 10, 101, 1010, 10101
DECLARE SUB SERIES ()
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 5
FOR J = 1 TO I
PRINT J MOD 2;
NEXT J
PRINT
NEXT I
END SUB
Comments