C++ 程序:将字符串中的大写字母转换为小写字母 日期: 2027-03-13 标签: 常规 #include using namespace std; int main() { string a; cin>>a; for(int i=0;i<a.length();i++)//遍历字符串 { if(a[i]>='A'&&a[i]<='Z')//如果是大写字母 { a[i]+=32;//转换为小写字母 } } cout<<a; return 0; } 原文地址: https://www.cveoy.top/t/topic/oUjQ 著作权归作者所有。请勿转载和采集! 免费AI点我,无需注册和登录