给出一个不多于3位的正整数n要求求出它是几位数。并上机实验。c++代码单纯用if语句 日期: 2028-09-09 标签: 社会 #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/JsR 著作权归作者所有。请勿转载和采集! 免费AI点我,无需注册和登录