/*已测试,可参考修改,也可复制粘贴,如不支持C++11请修改初始化方式,希望能帮到你!*/
#include
#include
using namespace std;
int main()
{
char ch {};
while(cin.get(ch) && ch != '@')
{
if(isalpha(ch))
{
if(islower(ch))
ch = toupper(ch);
else if(isupper(ch))
ch = tolower(ch);
cout << ch;
}
}
return 0;
}
#include
#include
using namespace std;
int main()
{
char ch;
while((ch=cin.get())!='@')
{
if( isdigit(ch) );
else if(tolower(ch)==ch)
cout<<(char)toupper(ch);
else
cout<<(char)tolower(ch);
}
return 0;
}