include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
define N 10000
int num3[N];
void sum(int num1[], int num2[], int lenmax){
int i;
int array = 0;
for(i = 0; i < lenmax; i){
num3[i] = num1[i] + num2[i] + array;
if(num3[i] >= 10){
num3[i] -= 10;
num3[i + 1] += 1;
array = 1;
}
else array = 0;
}
while(lenmax > 0 && num3[lenmax] == 0) lenmax–;
for(i = lenmax; i >= 0; i–)
printf(“%d”, num3[i]);
}
int main(void){
int i, j;
char n1[N], n2[N];
scanf(“%s%s”, n1, n2);
int len1 = strlen(n1), len2 = strlen(n2);
int lenmax = fmax(len1, len2);
int num1[N], num2[N];
for(i = len1 - 1, j = 0; i >= 0; i–, j)
num1[j] = n1[i] - ‘0’;
for(i = len2 - 1, j = 0; i >= 0; i–, j++)
num2[j] = n2[i] - ‘0’;
sum(num1, num2, lenmax);
}
加个markdown吧,用三个`括起来哦~