#include<iostream>
#include<string>
using namespace std;
int main()
{
string s;
getline(cin,s);
cout<<s<<endl;
char ch[205];
cin.getline( ch,205 );
cout<<ch<<endl;
return 0;
}
C/C++输入带有空格的字符串
最新推荐文章于 2024-04-15 22:18:39 发布
#include<iostream>
#include<string>
using namespace std;
int main()
{
string s;
getline(cin,s);
cout<<s<<endl;
char ch[205];
cin.getline( ch,205 );
cout<<ch<<endl;
return 0;
}