题目844 A+B Problem (V)

来源:互联网 发布:淘宝买家秀百度云 编辑:程序博客网 时间:2024/05/22 19:13

已AC代码:

 #include<cstdio>using namespace std;int change(int a){    int temp=0;    for(; a!=0; a /=10)    {        temp = temp*10 +a%10;    }    return temp;}int main(){    int a, b;    while((scanf("%d%d", &a, &b))&&(a||b))    {        printf("%d\n", change(a)+change(b));    }    return 0;}        


0 0
原创粉丝点击