int fibo (int n){
if n = 0 OR n = 1
return (1)
else
return (fibo(n-1) + fibo(n-2))
}
int fibo (int n){
...
}
int main(){
int n;
int resultRecursive;
printf("Enter a value of n in order to calculate fibonacci(n)?");
resultRecursive = fibo(n);
printf("Recursive version: result= %d", resultRecursive);
}
int fibo (int n){
...
}
int fiboIter (int n){
...
}
int main(){
int n;
int resultRecursive;
int resultIterative
printf("Enter a value of n in order to calculate fibonacci(n)?");
resultRecursive = fibo(n);
resultIterative = fiboIter(n)
printf("Recursive version: result= %d", resultRecursive);
printf("Iterative version: result= %d", resultIterative);
}