0% found this document useful (0 votes)
3 views5 pages

Recursion

The document outlines a series of tasks that involve writing recursive programs and functions in programming. These tasks include printing numbers in various orders, calculating factorials, sums, powers, Fibonacci series, and more. Each task focuses on utilizing recursion to solve common mathematical and programming problems.

Uploaded by

shehzilshahzad51
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Recursion

The document outlines a series of tasks that involve writing recursive programs and functions in programming. These tasks include printing numbers in various orders, calculating factorials, sums, powers, Fibonacci series, and more. Each task focuses on utilizing recursion to solve common mathematical and programming problems.

Uploaded by

shehzilshahzad51
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Recursion

1.​ Write a recursive program to print numbers from 1 to 10.

2.​ Write a recursive function to print numbers from 10 to 1.

3.​ Create a recursive program to find factorial of a number.


4.​ Write a recursive function to calculate sum of first N natural numbers.

5.​ Create a recursive program to find power of a number.

6.​ Write a recursive program to generate Fibonacci series up to N terms.


7.​ Create a recursive function to multiply two numbers using addition.

8.​ Write a recursive function to find product of first N numbers.

9.​ Create a recursive program to count digits of a number.


10.​Write a recursive function to reverse a number.

11.​Create a recursive program to find sum of digits of a number.

12.​Write a recursive function to check whether a number is palindrome or not.


13.​Create a recursive function to print even numbers from 1 to N.

14.​Write a recursive program to print odd numbers from 1 to N.

15.​Create a recursive function to find greatest common divisor (GCD).

You might also like