解题思路:
注意事项:
参考代码:
#include<iostream>
using namespace std;
int main()
{
string str;
getline(cin,str);
for(auto c:str)
{
if(c>='A'&&c<'Z')
{
c=tolower(c);
}
else if(c>='a'&&c<='z')
{
c=toupper(c);
}
cout<<c;
}
return 0;
}
0.0分
0 人评分
C二级辅导-进制转换 (C语言代码)浏览:813 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:812 |
程序员的表白 (C语言代码)浏览:1328 |
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:604 |
简单的a+b (C语言代码)浏览:631 |
WU-陶陶摘苹果2 (C++代码)浏览:974 |
三角形 (C++代码)记忆化搜索浏览:1234 |
C语言程序设计教程(第三版)课后习题6.3 (C++代码)浏览:963 |
Hello, world! (C++代码)浏览:1744 |
水仙花 (C语言代码)浏览:1052 |