第22869题 判断题
所谓对称数是指从左到右和从右到左读该数,其值相同,121或414等是对称数,而123不是对称数。
int n, new_number;
cout << "请输入正整数:";
cin >> n;
new_number = 0;
while (n != 0) {
    new_number = new_number * 10 + n % 10;
    n /= 10;
}
if (n == new_number)
    cout << "对称数";
else
    cout << "非对称数";
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析