?????????????C????
???????????? ???????[ 2016/8/22 9:48:17 ] ????????C???? .NET
?????????????????·??
??????????????????????????????磺123456789*123456789??
?????·??1??????
123456789*1 = 9 18 27 36 45 54 63 72 81
123456789*2 = 9 18 27 36 45 54 63 72 81
123456789*3 = 9 18 27 36 45 54 63 72 81
123456789*4 = 9 18 27 36 45 54 63 72 81
123456789*5 = 9 18 27 36 45 54 63 72 81
123456789*6 = 9 18 27 36 45 54 63 72 81
???????????????
????2?????λ??
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void big_data_multi (char *pstr1?? char *pstr2)
{
int length_str1 = strlen(pstr1);
int length_str2 = strlen(pstr2);
int *pstr3 = (int*)malloc(sizeof(int)*(length_str1+length_str2));
memset(pstr3?? 0?? sizeof(int)*(length_str1+length_str2));//???????????????????
for(int i = 0; i < length_str2; i++)//?????????
{
for(int j = 0; j < length_str1; j++)
{
pstr3[i + j + 1] += (pstr1[j] - '0') * (pstr2[i] - '0');
}
}
for (int i = length_str1 + length_str2 - 1; i >= 0; i--)
{
if(pstr3[i] >= 10)
{
pstr3[i - 1] += pstr3[i] / 10;
pstr3[i] = pstr3[i]%10;
}
}
int i = 0;
while (pstr3[i] == 0)
{
i++;
}
char *pstr4 = (char*)malloc(sizeof(char)*(length_str1 + length_str2 + 1));
int j = 0;
for(; j < length_str1+length_str2 && i < length_str1+length_str2; j++??i++)
{
pstr4[j] = pstr3[i] + '0';
}
pstr4[j] = '