LabAssignment-7 (24-1-2023)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Lab Assignment-7

WRITE THE PROGRAMS FOR THE FOLLOWING PROBLEMS USING RECURSION

1. Print first n natural numbers.

2. Find the sum of first n natural numbers.


3. Find the factorial of a number.

4. Find the sum of the digits of an integer.


5. Find the number of digits of an integer.

6. Find first n numbers of the Fibonacci sequence.


7. Find GCD of two numbers.

8. Find the power of any number.


9. Solve the Tower of Hanoi puzzle.

10. Check whether the given integer is prime or not.

You might also like