we have this thing to do where you need to get a number from the user (n) and you need to print this numbers location in the fibonachi series. meaning if you get n=8, then in the fibonachi series (1,1,2,3,5,8,13,21,34....) the location is 6.
This is what i started doing, which is basically nothing, cause i have no clue how to approach this in a recursive way...
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
int fibo(int n);
void main();
int n,x;
clrscr();
printf("Enter a number in the fibonachi series:");
scanf("%d", &n);
x=fibo(n);
printf("Your number is in the %d position in the series.", x);
getch();
}
int fibo(int n);
{
}
any tips? (just hints so i could get it by myself)