C++ 判断正整数位数:if 语句实现 日期: 2026-08-26 16:46:46 标签: 常规 #include using namespace std; int main(){ int n; cin>>n; if(n<10){ cout<'1位数'<endl; }else if(n<100){ cout<'2位数'<endl; }else{ cout<'3位数'<endl; } return 0; } 原文地址: https://www.cveoy.top/t/topic/l0u2 著作权归作者所有。请勿转载和采集! 免费AI点我,无需注册和登录