Department of Chemical Engineering and Materials Science
Amrita School of Engineering, Amrita Vishwa Vidyapeetham, Coimbatore
23CSE106 COMPUTER PROGRAMMING AND ALGORITHMIC PROBLEM SOLVING
(Semester 1; Batch: 2024 – 2028; AY: 2024 – 2025)
QUESTION LIST – SESSION 09 (09 October 2024)
(Course Faculty: Amal GS, Hareesh Padayath)
Instructions: For the questions below, write an algorithm in your rough record (class note book) before
you come to the lab. Refer textbooks or internet (generative AI) to get the logic behind the problems.
Use Recursion to solve the following problems:
1. Find the sum of first N numbers.
2. Find the sum of digits of a number.
3. Print the sequence 5, 7, 9, 11…..n
4. Reverse a number.
5. Find the factorial of a number.
6. Multiply two numbers a and b.
7. Count the number of digits in a number.
8. Count the number of zeroes in a number
9. Find GCD.
10. Print Fibonacci Series.
11. Raise a number a to another number b. Both numbers are entered by the user.
12. Perform binary search on an integer array.
13. Find the sum log(1) + log(2) + …..+ log(n)
14. Print the series for any number given as input by the user.
2023
202
20
2
20
202
2023
15. Print the partitions of an integer n given as input by the user.
6=2+4
6=1+1+4
6=3+3
6=1+2+3
6=1+1+1+3
6=2+2+2
6=1+1+2+2
6=1+1+1+1+2
6=1+1+1+1+1+1