# Lesson Archives

1. ## WAP to generate the following series 54321,5432,543,54,5

DECLARE SUB SERIES () CLS CALL SERIES END SUB SERIES FOR I = 5 TO 1 STEP -1 FOR J = I TO 1 STEP -1 PRINT J; NEXT J PRINT NEXT I : END SUB
2. ## WAP to generate the following series 5,54,543,5432,54321

DECLARE SUB SERIES () CLS CALL SERIES END SUB SERIES FOR I = 5 TO 1 STEP -1 FOR J = 5 TO I STEP -1 PRINT J; NEXT J PRINT NEXT I END SUB
3. ## WAP to generate the following series 55555,4444,333,22,1

DECLARE SUB SERIES () CLS CALL SERIES END SUB SERIES FOR I = 5 TO 1 STEP -1 FOR J = 1 TO I PRINT I; NEXT J PRINT NEXT I END SUB
4. ## WAP to generate the following numeric pattern 1,12,123,1234,12345

DECLARE SUB SERIES () CLS CALL SERIES END SUB SERIES FOR I = 1 TO 5 FOR J = 1 TO I PRINT J; NEXT J PRINT NEXT I END SUB
5. ## WAP using to display product of all numbers from 4 to 8

DECLARE SUB SERIES ( ) CLS CALL SERIES END SUB SERIES P = 1 FOR I = 4 TO 8 P = P * I NEXT I PRINT “PRODUCT OF ALL NUMBERS FROM 4 TO 8”; P END SUB
6. ## WAP to print the following series 9,7,5,….1

DECLARE SUB SERIES ( ) CLS CALL SERIES END SUB SERIES FOR I = 9 TO 1 STEP-2 PRINT I NEXT I END SUB
7. ## WAP using to display first 19 even numbers

DECLARE SUB SERIES ( ) CLS CALL SERIES END SUB SERIES A = 2 FOR I = 1 TO 19 PRINT A, A = A+ 2 NEXT I END SUB
8. ## WAP using to display first 13 odd numbers

DECLARE SUB SERIES ( ) CLS CALL SERIES END SUB SERIES A = 1 FOR I = 1 TO 13 PRINT A, A = A+ 2 NEXT I END SUB
9. ## WAP to print first ten multiples of input number

CLS INPUT “ENTER ANY NUMBER”; N FOR I = 1 TO 10 PRINT N * I, NEXT I END DECLARE SUB SERIES ( N) CLS INPUT “ENTER ANY NUMBER”; N CALL SERIES (N) END SUB SERIES (N) FOR I = 1 TO 10 PRINT N * I, NEXT I END SUB
10. ## WAP using to print the sum of first ten positive integers

DECLARE SUB SERIES ( ) CLS CALL SERIES END SUB SERIES FOR I = 1 TO 10 S = S + I NEXT I PRINT “SUM OF FIRST  TEN POSITIVE INTEGERS” ; S END SUB
error: Content is protected !!