【文件属性】:
文件名称:100000!你hold不住
文件大小:446KB
文件格式:TXT
更新时间:2015-11-24 09:44:40
100000的阶乘
计算100000的阶乘
#include
#include
#include
#define N 1000000
int a[N];
int main()
{
FILE*fp;
clock_t start,finish;
double duration;
int i,j,n,mul;
int jin,count;
fp=fopen("G:\\³ÌÐò-1\\³ÌÐò\\ÎҵĽ׳Ë\\test.txt","wt");
printf("please input numbers n=");
start=clock();
a[0]=1;
scanf("%d",&n);
count=1;
for(i=1;i<=n;i++)
{
jin=0;
for(j=0;j=0;i--)
{
printf("%d",a[i]);
fprintf(fp,"%d",a[i]);
}
finish=clock();
duration=(double)(finish-start)/CLOCKS_PER_SEC;
printf("\n%f seconds\n",duration);
return 0;
}