#include <iostream>
#include <cctype>
using namespace std;
int main()
{
cout << "Enter text for analysis, and type @ to terminate input.\n";
char ch;
#include <iostream>
#include <cctype>
using namespace std;
int main()
{
cout << "Enter text for analysis, and type @ to terminate input.\n";
char ch;
while(ch != '@')
{
if(islower(ch))
{
ch = toupper(ch);
}
else if(isupper(ch))
{
ch = tolower(ch);
}
if(isdigit(ch) == false)
{
cout << ch;
}
cin.get(ch);
}
cout << endl;
return 0;
}
编写一个程序,读取键盘输入,直到遇到@符号为止。并回显输入(数字除外)
最新推荐文章于 2022-05-20 12:01:31 发布