![Infographic of the Day Infographic of the Day](http://chzdailywhat.files.wordpress.com/2011/06/53bb3069-2c2a-4f87-ba86-5d5d9d069226.jpg)
Infographic of the Day: The future ain’t what it used to be. I don’t see a flying car anywhere on this chart!
Infographic of the Day: The future ain’t what it used to be. I don’t see a flying car anywhere on this chart!
[reddit]
#includestdio.h
#include math.h //please add smaller and larger symbol
unsigned long long fib(int n)
{
double x = sqrt(5)/5;
double f1 = x * pow((1 + sqrt(5)) / 2, n);
double f2 = -x * pow((1 - sqrt(5)) / 2, n);
return (unsigned long long)(f1 + f2);
}
int main()
{
int n;
printf("Find nth Fibonacci number, n = ");
scanf("%d",&n);
printf("%dth Fibonacci number: %llu\n",n,fib(n));
return 0;
}