Lab_Program_classIX_ICSE
Lab_Program_classIX_ICSE
Example:
Consider the number 512.
Sum of digits = 5 + 1 + 2 = 8
Cube root of 512 = 8
As Sum of digits = Cube root of Number hence 512 is a Dudeney number.
3. Write programs to find the sum of each of the following series:
i. S= 1-2+3-4+5-6+….+19-20
1 1 1 1 1
ii. S=1+ + + + +…+
2 3 4 5 10
4. Write a program to print the first 15 numbers of the Pell series. Pell series is such a series which starts from
1 and 2 , and subsequent numbers is the sum of twice the previous number and the number previous to
the previous number. Pell series: 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860, …
5. Write a program to find the sum of 1st 10 numbers of Lucas series i.e. 2,1,3,4,7,11,18,…. Lucas series is
such a series which starting from 2 and 1, and subsequent numbers are the sum of the previous two
numbers.
6. Write a program to input a number and find whether the number is a Disarium number or not. A number is
said to be Disarium if sum of its digits powered with their respective positions is equal to the number itself.
3
44
555
6666
77777
8. Write a program in Java to find the sum of the given series:
S = 1! + 2! + 3! + …. + n!
9. Write a program in Java to display the following patterns.
1 * * * *
2 2 * * *
3 3 3 * *
4 4 4 4 *
5 5 5 5 5
10. Write a program in Java to display the following patterns.
ABCDE
ABCD
ABC
AB
A