![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
#include<string> using namespace std; int main(int argc, char *argv[]) { string s; cin>>s; cout<<s<<endl;; return 0; }
#include <iostream>
#include<string>
using namespace std;
int main(int argc, char *argv[])
{
string s;
cin>>s;
cout<<s<<endl;
return 0;
}
****************************************************************************************************************************
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
#include <iostream> #include<string> using namespace std; int main(int argc, char *argv[]) { string s; getline( cin, s) ; cout<<s<<endl; return 0; }
#include <iostream>
#include<string>
using namespace std;
int main(int argc, char *argv[])
{
string s;
getline( cin, s) ;
cout<<s<<endl;
return 0; }
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
#include <iostream> #include<string> using namespace std; int main(int argc, char *argv[]) { string s; while (getline(cin,s)) cout<<s<<endl; return 0; }
#include <iostream>
#include<string>
using namespace std;
int main(int argc, char *argv[])
{
string s;
while ( getline( cin, s) )
cout<<s<<endl;
return 0; }
*********************************************************************************************************
#include <iostream> #include <string> using namespace std; main () { char s[100]; cin.getline (s, 100); cout << name <<endl; }