#include<iostream>
#include<string>
using namespace std;
int main()
{
string word;
while(cin>>word)
cout<<"word read is"<<word<<endl;
cout<<"OK:no more words to read:bye\n";
return 0;
}
上述代码载运行时如何使其跳出循环(在不修改原码的前提下);
如果不能请给出理由 谢谢
...全文
42618打赏收藏
一个奇怪的c++问题
#include #include using namespace std; int main() { string word; while(cin>>word) cout<<"word read is"<<word<<endl; cout<<"OK:no more words to read:bye\n"; return 0; } 上述代码载运行时如何使其跳出循环(在不修改原码的前提下); 如果不能请给出理由 谢谢