https://www.cnblogs.com/Es-war/p/12584986.html
#include <iostream>
#include <string>
#include <algorithm>//头文件
using namespace std;
string str;
int main()
{
cout << "请输入一个包含大小写字母的字符串: " << endl;
cin >> str;
transform(str.begin(), str.end(), str.begin(), ::tolower);
cout << "转小写: " << str << endl;
transform(str.begin(), str.end(), str.begin(), ::toupper);
cout << "转大写: " << str << endl;
system("pause");
return EXIT_SUCCESS;
}