hey im writing a program to solve this puzzle at slyfx. I need to calculate the fibonacci of numbers from 0-10000. I figured out the program but i need to know what variable can hold such big numbers as it starts rounding after 49. i have tried long double, long int, unsigned logn int....any suggestion???
here is the code
Code:
#include<stdio.h>
#include<string.h>
int main()
{
unsigned long int a=0,b=1,count=2,c;
printf("0\n1\n");
while(count<=10000)
{
c=a+b;
printf("%lu\n",c);
a=b;
b=c;
count++;
}
return 0;
}