该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
#include
#include
#define lenth 1000
void main()
{
void multiply(char *a,char *b);
int i,m;
char s[5],result[lenth]="1";
for(i=2;i<=100;i++){
sprintf(s,"%d",i);
multiply(result,s);
}
m=strlen(result);
printf("the digits of the 100! are %d\n",m);
for(i=0;i
for(i=m-1;i>=0;i--)printf("%d",result[i]);
printf("\n");
}
void multiply(char *a,char *b)
{
int m=strlen(a) ,n=strlen(b),k=m+n,i,j,c[lenth]={0},temp;
for(i=0;i
for(i=0;i
for(i=0;i
for(i=0;i
for(i=0;i
if(c[i]>9){
c[i+1]+=c[i]/10;
c[i]%=10; }
if(c[k-1]>0)
for(i=0;i
else
for(i=0;i
}