#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
string str;
getline(cin, str);
char ch = getchar();
cout << str << " " << ch << endl;
if (ch >= 'a' && ch <= 'z') {
transform(str.begin(), str.end(), str.begin(), ::tolower);
} else {
transform(str.begin(), str.end(), str.begin(), ::toupper);
}
cout << str << endl;
static int count = 0;
while (str.find(ch) != string::npos) {
count++;
str.replace(str.find_first_of(ch), 1, "");
}
cout << count << endl;
getchar();
getchar();
return 0;
}版权声明:本文为u010635811原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。