标签:
1234 1234 125 117 0 0
8642 1232
1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 int interger(char ch[20]) 5 { 6 int i,sum=0; 7 for(i=strlen(ch)-1;i>=0;i--) 8 sum=sum*10+ch[i]-‘0‘; 9 return sum; 10 } 11 int main() 12 { 13 int a,b; 14 while(~scanf("%d %d",&a,&b)&&(a+b)) 15 { 16 char ch[20],str[20]; 17 sprintf(ch,"%d",a); 18 int m=interger(ch); 19 sprintf(str,"%d",b); 20 int n=interger(str); 21 printf("%d\n",m+n); 22 } 23 return 0; 24 }
标签:
原文地址:http://www.cnblogs.com/fengshun/p/4574882.html