#include <bits/stdc++.h>
using namespace std;
int main() {
//char s[128];
int a;
string s;
cin >> a;
//scanf("%d", &a);
cout << a << endl;
getchar();//scanf和cin都要
getline(cin, s);
//scanf("%[^\n]s", &s);
cout << s << endl;
std::string str("The quick brown fox jumps over the lazy dog.");
str.replace(10, 5, 2, 'R'); // (5)
str.replace(str.begin(), str.begin() + 3, "AAA"); // (6)
std::cout << str << '\n';//AAA quick RR fox jumps over the lazy dog.
return 0;
}
关于输入输出
最新推荐文章于 2024-07-23 17:36:37 发布