#include <iostream>
using namespace std;
char GetChar(istream&in=cin)
{
char ch;
while(in.peek()!=EOF&&(ch=cin.get())==' ');
//cout<<"ch="<<ch<<endl;
return ch;
}
int main()
{
char ch;
cout<<"请输入一行字符串:"<<endl;
ch=GetChar();
while(ch!='\n'&&ch!=EOF)
{
cout.put(ch);
ch=GetChar();
}
cout<<endl;
system("PAUSE");
return 0;
}