摘要: 水题~,就是给你两个数,先把这两个数翻转,然后将这两个数相加在翻转输出,注意不要输出前导零,但中间的零要输出。代码: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #include<iostream> 5 using namespace std; 6 int reverse(int x) 7 { 8 int s=0; 9 while(x)10 {11 s=s*10+x%10;12 x=x/10;13 }14 return s;15 }16 i... 阅读全文
posted @ 2011-12-06 09:12 Misty_1 阅读(221) 评论(0) 推荐(0)