<swustoj>?id=26 翻转数的和

链接http://acm.swust.edu.cn/problem/26/

#include <stdio.h>
int main()
{
    int fun(int x);
    int a,b;
    while(scanf("%d%d",&a,&b)!=EOF)
    {
        printf("%d\n",fun(a)+fun(b));
    }
    return 0;
}
int fun(int x)
{
    int ans=0;
    while(x!=0)
    {
        ans=ans*10+x%10;
        x=x/10;
    }
    return ans;
}

 

posted @ 2016-07-27 13:33  艹kiss灬不离  阅读(381)  评论(0)    收藏  举报