void multiply(int *a, int a_len, int *b, int b_len, int *c, int c_len){
int i,j;
i = 0;
j = 0;
while(i
while(j
*(c+i+j) += (*(a+i)) * (*(b+j));
j++;
}
i++;
j=0;
}
i = 0;
while(i
*(c+i+1) += *(c+i)/10;
*(c+i) = *(c+i)%10;
i++;
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void convert(int q, int *c){
int i = 0;
while(q){
c[i++] = q%10;
q = q/10;
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void big_printf(char* label,int *c,int c_len){
printf("%s",label);
int i = c_len-1;
while(c[i] == 0)
i--;
while(i>=0){
printf("%d",c[i--]);
}
printf("\n");
}
阅读(971) | 评论(0) | 转发(0) |