1. 5, 55, 555, 5555, 55555
DECLARE
SUB SER()
CLS
CALL
SER
END
SUB
SER
A
= 5
FOR
J = 1 TO 5
PRINT
A;
A=
A * 10 + 5
NEXT
J
END
SUB
2. 55555, 5555, 555,
55, 5
DECLARE
SUB SER()
CLS
CALL
SER
END
SUB
SER
A
= 55555
FOR J = 1 TO 5
PRINT
A;
A=
A \10
NEXT J
END
SUB
3. 1, 4, 9, 25, ………100
DECLARE
SUB SER()
CLS
CALL
SER
END
SUB
SER
FOR
K = 1 TO 10
PRINT
K^2;
NEXT
K
END
SUB
4. 1, 8, 27, 64, ………..
upto 10th term.
DECLARE
SUB SERIES()
CLS
CALL
SERIES
END
SUB
SERIES
FOR
K = 1 TO 10
PRINT
K^3;
NEXT
K
END
SUB
5. 1
12
123
1234
12345
DECLARE SUB NUM()
CLS
CALL NUM
END
SUB NUM
S = 0
FOR K = 1 TO 5
S=S*10+K
PRINT
S
NEXT K
END SUB
6. 1
22
333
4444
55555
DECLARE SUB NUM()
CLS
CALL NUM
END
SUB NUM
S = 1
FOR K = 1 TO 5
PRINT
S * K
S =
1 * 10 + 1
NEXT K
END SUB
7. Fibonnaci series
1 1
2 3 5 8 13 ….. 10th term.
DECLARE SUB
PATTERN()
CLS
CALL PATTERN
END
SUB PATTERN
X = 1
Y = 1
FOR K = 1 TO 5
PRINT X, Y,
X =
X + Y
Y
=X + Y
NEXT K
END SUB
8. -20, -15, -10, …….
Upto 10th term.
DECLARE SUB
SERIES()
CLS
CALL SEREIS
END
SUB SERIES
N = -20
FOR J = 1 TO 10
PRINT N;
N = N + 5
NEXT J
END SUB
9. 100, 90, 80,
70,……..10
DECLARE SUB
SERIES()
CLS
CALL SEREIS
END
SUB SERIES
FOR J = 100 TO 10 STEP -10
PRINT N;
NEXT J
END SUB
10. 5, .5, .05, .005,
.0005, .00005
DECLARE
SUB SERIES()
CLS
CALL SEREIS
END
SUB SERIES
N = 5
FOR J = 1 TO 6
PRINT N;
N = N / 10
NEXT J
END SUB
No comments:
Post a Comment