#include<iostream>
#include<cctype>
int main()
{
using namespace std;
char ch[30];
cout << "输入:";
//cin >> ch[0];
int i = 0;
while (i < 30 && cin>>ch[i])
{
if (ch[i] == '@')
break;
else if (islower(ch[i]))
{
ch[i] = toupper(ch[i]);
}
else if (isupper(ch[i]))
{
ch[i] = tolower(ch[i]);
}
else
i--;
#include<cctype>
int main()
{
using namespace std;
char ch[30];
cout << "输入:";
//cin >> ch[0];
int i = 0;
while (i < 30 && cin>>ch[i])
{
if (ch[i] == '@')
break;
else if (islower(ch[i]))
{
ch[i] = toupper(ch[i]);
}
else if (isupper(ch[i]))
{
ch[i] = tolower(ch[i]);
}
else
i--;
if (++i < 30)
{
cout << "输入:";
}
}
for (int j = 0; j < i; j++)
{
cout << ch[j] << endl;
}
cin.get();
cin.get();
return 0;
}
{
cout << "输入:";
}
}
for (int j = 0; j < i; j++)
{
cout << ch[j] << endl;
}
cin.get();
cin.get();
return 0;
}