#include<iostream>
#include<string>
using namespace std;
int main()
{
string word;
while(cin>>word)
cout<<"The word read is:"<<word<<endl;
cout<<"Ok!No word to read.Bye!Good girl.";
return 0;
}
输入步骤:“I am a student”->回车->ctr+z->回车;(cin>>word) 条件为假,退出循环!