缘由https://bbs.csdn.net/topics/398165677
//字符串指定位置倒序输出缘由https://bbs.csdn.net/topics/398165677
char aa[] = "abcABCabc\n";
int a = 3, b = 5, c = 0, d = b;
while (aa[c] != '\n')if (c < a || c > b)cout << aa[c++]; else if(d >= a) cout << aa[d--], ++c;
char aa[] = "abcABCabc\n";
string asa = "";
cin >> asa; asa += "\n";
int a = 4, b = 7, c = 0, d = b;
cin >> a >> b; d = b;
while (asa[c] != '\n')if (c < a || c > b)cout << asa[c++]; else if (d >= a) cout << asa[d--], ++c;
char aa[] = "abcABCabc\n", jh;
string asa = "";
cin >> asa; asa += "\n";
int a = 4, b = 7, c = 0, d = b;
cin >> a >> b; d = b;
//while (asa[c] != '\n')if (c < a || c > b)cout << asa[c++]; else if (d >= a) cout << asa[d--], ++c;
while (a != b)jh = asa[a], asa[a] = asa[b], asa[b] = jh, ++a, --b;
cout << asa;