1 #include2 #include 3 const int Len = 100; 4 void Mul(char a[],char b[],char c[])//大数乘法 5 { 6 int i,j; 7 int alen = strlen(a),blen = strlen(b); 8 memset(c,0,Len); 9 for(i = 0; i < alen; i++)10 for(j = 0; j < blen; j++) //处理进位11 {12 c[i + j] += a[i] * b[j];13 if(c[i + j] >= 10)14 {15 c[i+j+1] += c[i+j] / 10;16 c[i+j] %= 10;17 }18 }19 }20 int Print (char n[])21 {22 int i;23 for(i = Len-1; i > 0; i--)24 if(n[i] != 0) break;25 for(; i >= 0; i--)26 //将0排除27 printf("%d",n[i]);28 printf("\n");29 return 0;30 }31 int Input (char n[])//将大数读入的函数32 {33 char s[Len];34 int i,l;35 for(i = 0; i < Len; i++) n[i] = 0;36 if(scanf("%s",s) < 1) return -1;37 l = strlen(s);38 for(i=0; i