C++ 获取整数的个位数:代码示例及详解 日期: 2028-01-02 标签: 常规 #include \nusing namespace std;\n\nint main() {\n int num = 102;\n \n int units = num % 10;\n \n cout << "个位数是:" << units << endl;\n \n return 0;\n} 原文地址: https://www.cveoy.top/t/topic/qeKB 著作权归作者所有。请勿转载和采集! 免费AI点我,无需注册和登录