标签:while cout space cpp else pac clu namespace 回文数判断
#include<iostream> using namespace std; void is_HuiWenShu(int c) { int n = 0; int m = c; while (m != 0) { n = n * 10 + m%10; m = m / 10; } if (n == c) cout << "yes" << endl; else cout << "no" << endl; } int main() { int num,a,b; cin >> a >> b; num = a + b; is_HuiWenShu(num); return 0; }
标签:while cout space cpp else pac clu namespace 回文数判断
原文地址:https://www.cnblogs.com/zhanghua-322/p/11302413.html