#include<stdio.h>
int main()
{
char begin1[11],begin2[11];
int i1,j1;
int i2,j2;
int m,n;
while(scanf("%s %s",begin1,begin2)!=EOF){
char last1[11]={'\0'},last2[11]={'\0'};//一定要注意这一步
i1=j1=i2=j2=0;
while(begin1[i1]){
if(begin1[i1]!=','){
last1[i2++]=begin1[i1++];
}else{
i1++;
}
}
while(begin2[j1]){
if(begin2[j1]!=','){
last2[j2++]=begin2[j1++];
}else{
j1++;
}
}
sscanf(last1,"%d",&m);
sscanf(last2,"%d",&n);
printf("%d\n",m+n);
}
return 0;
}
A+B
最新推荐文章于 2023-05-20 22:07:26 发布