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 prime numbers in given range using functions

Write a function in C programming to find prime numbers using function. How to find all prime numbers between two intervals using functions. Display all prime numbers between a given range using function in C programming.

Example

Input

Input lower limit: 10
Input upper limit: 50

Output

Prime numbers between 10-50 are: 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47

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 check even or odd using functions

Write a C program to input a number from user and check whether given number is even or odd using functions. How to check even or odd using functions in C programming. Write a function in C programming to check even or odd.

Example

Input

Input any number: 10

Output

10 is even

Read more

C program to find maximum and minimum using functions

Write a C program to input two or more numbers from user and find maximum and minimum of the given numbers using functions. How to find maximum and minimum of two or more numbers using functions in C programming.

Example

Input

Input two numbers: 10
20

Output

Maximum = 20
Minimum = 10

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

C program to find cube of a number using function

Write a C program to input any number from user and find cube of the given number using function. How to find cube of a given number using function in C programming. Write a C function to find cube of a given number.

Example

Input

Input any number: 5

Output

Cube of 5 = 125

Read more