C++ 编程练习:将字符串转换为小写字母 日期: 2025-09-23 标签: 常规 #include #include using namespace std; int main(){ char s[1000]; cin>>s; int len=strlen(s); for(int i=0;i<len;i++) if(s[i]>='A'&&s[i]<='Z')//如果是大写字母 s[i]+=32;//转化为小写字母 cout<<s<<endl; return 0; } 原文地址: https://www.cveoy.top/t/topic/oUjI 著作权归作者所有。请勿转载和采集! 免费AI点我,无需注册和登录