The Fibonacci sequence’s recursive formula describes the first two terms and defines each subsequent term as the sum of the two terms before it. a1=1a2=1an=an−1+an−2,forn≥3.

For example, to find the tenth term of the sequence, we would sum the eighth and ninth terms.

If else is a conditional statement in programming that executes a separate series of statements based on whether an expression is true or false. The test expression inside the parenthesis () is evaluated by the if statement.

If the test expression returns true, the statements in the if body are performed. Statements inside the body of if are not performed if the test expression is evaluated to false. Using this method we can execute the fibonacci program in c using recursion.

In C, the if-else statement is used to carry out operations based on a set of conditions. If and only if the supplied condition is true, the operations stated in the if block are executed.

You can create a chain of if statements using the if/else if statement. The if statements are evaluated one after the other until one of the if expressions is true or the if/else if chain ends. If there is no true expression at the end of the if/else if chain, no code blocks are executed. This is main concept for the program like this fibonacci program in c using recursion.

```
//fibonacci program in c using recursion
#include<stdio.h>
int fib(int);
int main()
{
int n, i;
printf("Enter the number\n");
scanf("%d",&n);
printf("fib series is \n");
for(i=0;i<n;i++)
{
printf("%d ",fib(i));
}
}
int fib(int i)
{
if(i==0) return 0;
else if(i==1) return 1;
else return (fib(i-1)+fib(i-2));
}
```

Output of fibonacci program in c using recursion:

Enter the number

10

fib series is

0 1 1 2 3 5 8 13 21 34