#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#define MAX 100
main()
{
char temp,n[MAX],m[MAX],result[MAX*2+1];
int lenn,lenm,i,now,x,high,low,place;
scanf("%s%s",n,m);
lenm=strlen(m);
lenn=strlen(n);
for (i=0;i<MAX*2+1;i++) result[i]='0';
/*将字符串倒置 */
for (i=0;i<lenn/2;i++){
temp=n[i];
n[i]=n[lenn-i-1];
n[lenn-i-1]=temp;
}
for (i=0;i<lenm/2;i++){
temp=m[i];
m[i]=m[lenm-i-1];
m[lenm-i-1]=temp;
}
for (i=0;i<(lenm>lenn?lenm:lenn);i++){
now=n[i]+m[i]-96;
place=i;
do{
high=(now+result[place]-48)/10;
low=(now+result[place]-48)%10;
result[place++]=(low+48);
now=high;}
while(now==1);
} result[place]='\0';
for (i=0;i<strlen(result)/2;i++){
temp=result[i];
result[i]=result[strlen(result)-i-1];
result[strlen(result)-i-1]=temp;
}
printf("%s\n\n",result);printf("%d",'.');
system("pause");
}
输入某 些数有错误