You are on page 1of 1

USER DEFINED FUNCTIONS

PROGRAMS TEACHER’S
S.NO SIGNATURE
1. Write a function to find the sum of series:
(2) + (2+4) + (2+4+ 6) + ( 2 + 4 + 6 + 8) ……. Up to N terms
2. Write a function to find the sum of the series:
1 + 1/3 + 1/5 + 1/7 + 1/9 + ….. + 1/N
3. Write a function to find the sum of the series:
1^2 + 3^2 + 5^2 + 7^2 + 9^2 + …….. up to N terms
Write a function to find the sum of the series:
4. (1) + (1+3) + (1+3+ 5) + ( 1 + 3 + 5 + 7) ……. Up to N terms
5. Write a function to find the sum of the series:
1 + x^2 + x^3 + ……. Up to N terms
6. Write a function to find the sum of the series:
1 + 1/3^2 + 1/5^2 + 1/7^2 + 1/9^2 + ….. + 1/N^2
7. Write a function to find the sum of the series:
1 + 1/2^2 + 1/4^2 + 1/6^2 + 1/8^2 + ….. + 1/N^2
8. Write a function to find the sum of the series:
1/1^2 + 1/2^2 + 1/3^2 + 1/4^2 + 1/5^2 + ….. + 1/N^2
9. Write a function to find the sum of the series:
1 + 1/2! + 1/3! + 1/4! + 1/5! + ….. + 1/N!
10. Write a function to find the sum of the series:
x+ x^2/2! + x^4/4! + x^6/6! + x^8/8! + ……. + x^n/n!
11. Write a function to find the sum of the series:
1 + x/2! + x^2/3! + x^3/4! + x^4/5! + ….. + x^N/(N+1)!
12. Write a program that inputs a series of integers and passes them on one at a
time to function called even(), which uses the modulus operator to determine
if an integer is even. The function should take an integer argument and return
true if an integer is even, otherwise false
13. A large chemical company pays its salespeople on a common basis. The
salespeople receive Rs. 200 per week plus 9% of their gross sales for that
week. For example, a salesperson who sells Rs. 5000 worth of chemicals in a
week receives Rs.200 plus 9% of 5000, or a total of Rs.650. Develop a
program that will input each salespersons gross sales for last week and
calculate and display the salespersons earnings.

You might also like