2015-11-20 22:51:58 +01:00
|
|
|
#include<stdio.h>
|
|
|
|
|
|
|
|
int fibo_r(int n)
|
|
|
|
{
|
|
|
|
if ( n < 2 )
|
|
|
|
return n;
|
|
|
|
else
|
|
|
|
return ( fibo_r(n-1) + fibo_r(n-2) );
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2019-07-30 20:16:24 +02:00
|
|
|
int counter = 1000;
|
2015-11-20 22:51:58 +01:00
|
|
|
int fib ;
|
|
|
|
while(counter--) {
|
2019-07-30 20:16:24 +02:00
|
|
|
fib += fibo_r(20);
|
2015-11-20 22:51:58 +01:00
|
|
|
}
|
|
|
|
}
|