C program to print even or odd numbers in given range using recursion

Write a recursive function in C programming to print all even or odd numbers between 1 to n. How to print all even numbers in given range using recursion in C programming. Logic to print even/odd numbers in given range using recursion.

Example

Input

Input lower limit: 1
Input upper limit: 10

Output

Even numbers between 1 to 10: 2, 4, 6, 8, 10
Odd numbers between 1 to 10: 1, 3, 5, 7, 9

Read more

C program to find sum of natural numbers in given range using recursion

Write a recursive function in C programming to find sum of all natural numbers between 1 to n. How to find sum of all natural numbers using recursion in C program. Logic to find sum of natural numbers in given range using recursion.

Example

Input

Input lower limit: 1
Input upper limit: 10

Output

Sum of natural numbers from 1 to 10 = 55

Read more

C program to print all natural numbers from 1 to n using recursion

Write a recursive function in C programming to print all natural numbers between 1 to n. How to print all natural numbers from 1 to n using recursion in C program. Logic to print all natural numbers in given range using recursion in C programming.

Example

Input

Input lower limit: 1
Input upper limit: 10

Output

Natural numbers between 1 to 10: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 

Read more

C program to find nth fibonacci term using recursion

Write a recursive function to generate nth fibonacci term in C programming. How to generate nth fibonacci term in C programming using recursion. Logic to find nth Fibonacci term using recursion in C programming.

Example

Input

Input any number: 10

Output

10th Fibonacci term: 55

Read more

C program to find power of a number using recursion

Write a C program to input a number from user and find power of given number using recursion. How to find power of a number using recursive function in C programming. Logic to find power of a number using recursion in C programming.

Example

Input

Input base number: 5
Input power: 2

Output

2 ^ 5 = 25

Read more