c++程序—输入
#include<iostream> using namespace std; #include<string> int main() { string str = "hello world!"; cout << str << endl; cin >> str; cout << str << endl; system("pause"); return 0; }
#include<iostream> using namespace std; #include<string> int main() { string str = "hello world!"; cout << str << endl; cin >> str; cout << str << endl; system("pause"); return 0; }