1. 首页
  2. 课程学习
  3. C++/C
  4. 回文数(一).cpp

回文数(一).cpp

上传者: 2020-08-08 00:15:37上传 CPP文件 474B 热度 44次
样例代码 #include using namespace std; int count;//计数器 void hw(int x){ int m=x; int b=0; while(x>0){//输入的相反数 b=b*10+(x); x=x/10; } x=m+b; m=x; //m储存为相加后的新数 b=0; while(x>0){//输入的相反数 b=b*10+(x); x=x/10; } //此时b为相加后数的相反数 count++; if(count>=8){ cout
下载地址
用户评论