You are on page 1of 2

1.

Write programs to display the following serieses-


(a) 1,3,5,7,9,............29
(b) 2, 4, 6, 8, 10, .....30
(c) 100, 90, 80, 70, ....0
(d) 1, 2, 4, 7, 11, 16, 22, ....... nth. Term (Take n as input)
(e) 2, 4, 8, 14, 22, 32, ....... nth. Term (Take n as input)
2. Write a program to find the sum of first 10 odd natural numbers.
3. Write a program to find the sum of first 10 even natural numbers.
4. Write a program to find the sum of all 3-digit even natural numbers.
5. Write a program to find the sum of all 3-digit odd natural numbers.
6. Write a program to input an integer and find factorial value of it.
7. Write a program to input an integer and print its factors.
8. Write a program to input an integer and find its factors.
9. Write a program to input an integer and check whether it is prime or not.
10. Write a program to input 10 integers and find their sum.
11. Write a program to input 10 integers and find the sum of even numbers only
12. Write a program to input 10 integers and find the sum of 2-digit and 3-digit number separately.
13. Write a program to input 10 integers and display the largest among them.
14. Write a program to input 10 integers and display the largest as well as smallest among them.
15. Write a program to input 10 integers and display the largest even integer. In case there is no even integer
print “No Even Integer Found”.
16. Write a program to input 10 integers and display the largest even and smallest odd among them.
17. Write a program to input 10 integers and check whether each of the entered numbers are even or odd.
18. Write a program to input 10 integers and check whether all the numbers are in ascending order.
19. Write programs to find the sum of the following serieses:
(a) 1*2 + 2*3 + 3*4 + 4*5 + .... + 9*10
(b) 1*2 + 3*4 + 5*6 + 7*8 + 9*10
(c) 1*3 + 2*4 + 2*5 + .... + 9*11
(d) 1 – 2 + 3 – 4 ...... + 19 – 20
(e) 1 + 1/2 + 1/3 + 1/4 + .... + 1/10
(f) 1 - 1/2 + 1/3 - 1/4 + .... - 1/10
20. Write a program to find the sum of first ten numbers of Fibonacci series 1, 1, 2, 3, 5, 8. In this series the first
two numbers are 1 and 1 and other numbers are sum of the previous two numbers.
21. Write a program to print the first fifteen numbers of the Pell series. Pell series is such a series which starts
from 1 and 2 and subsequent numbers are the sum of twice the previous numbers and the number previous to the
previous number.
Pell series: 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378......
22. Write a program to find the sum of first ten numbers of Lucas series. Lucas series starts from 2 and 1, and
subsequent numbers are the sum of previous two numbers.
Lucas series: 2, 1, 3, 4, 7, 11......
23. Write a program to input and integer and check whether it is perfect, abundant or deficient number. If the sum
of the factors excluding itself is equal to that number it is perfect, if greater than that number it is abundant and if
less than that numbers it is deficient number.
24. Write a program to input two integers and check whether it forms an amicable pair or not. An amicable pair is
such that the sum the factor excluding itself of one number is the other number and sum of the factors excluding
itself of the other number is the number.
Example: 220,284
220=1+2+4+5+10+11+20+22+44+55+110=284 and
284=1+2+4+71+142=220
25. Write a program to pass an integer as argument and return sum of its digits.
26. Write a program to pass an integer as argument and return the average of its digits.
27. Write a program to pass an integer and remove all the even digits from it.
28. Write a program to pass an integer and return a new number by having the digits arranged in ascending order.
29. Write a program to pass an integer and return a new number that formed by having the digits arranged in
descending order.
30. Write a program to input an integer and display all of its digits are primes or not.
31. Write a program to pass an integer as argument and check whether it is amstrong number or not. Amstrong
numbers are those whose sum of the cube of its digits are the number itself.
Example: 153=13+53+33
32. Write a program to check a number is automorphic or not. Square of an automorphic number ends with the
number itself. Such as 52=25,252=625
[Similarly Trimorphic when n cube ends with n example.493=1176 trimetamorphic 3n2 end with n
example.3*(667)2=1334667.
33. Try to check following for an inputted number.
(a) Happy number: Continuously summing the square of digits terminates in 1.
(b) Magic numbers: Continuously summing the digits terminates in 1.
(d) Harshad numbers: If a number is divisible by the sum of its digits.
(e) Kaprekar numbers: If n is a number of d number f digits if d number of digits from the right side of the square
of n is added to the d or (d-1) number of digits from its left side and from the original number n.
34. Write a program to find LCM of two numbers taken as input.
35. Write a program to find the HCF of the two inputted numbers.
36. Write programs to find the sum of the following serieses:
(a) 1 – 2/2! + 3/3! – 4/4! ....... ± n/n!
(b) 1 + 12 + 123 + 1234 + .... + (1234...n)
(c) 1 + 11 + 111 + ..... + nth term
(d) 13 + 23 + 33 + ..... + nth term
(e) 1 + (1+2) + (1+2+3) + ..... + nth term
(f) 1 + 2! + 3! + ..... + nth term

*******

You might also like