一个斐波纳锲数列挑战数据极限
#define CLOCKS_PER_SEC ((clock_t)1000)#include<stdio.h>
#include<time.h>
main()
{
double i,f[3000], s[3000],duration;
clock_t start, finish;
start=clock();
for(i=1,f[1]=1,f[2]=2;i<=1460;i++)
{ f[i+2]=f[i+1]+f[i];
s[i]=f[i]/f[i+1];
printf("%.16e\t%.16e\t%.16e\n",f[i],f[i+1],s[i]);
}; finish=clock();
duration=(double)(finish-start)/CLOCKS_PER_SEC;
printf("%f\n",duration);
getch();
}