#include<iostream>
#include<string>
using namespace std;
int main()
{
string word;
int number = 0;
cout << "Enter words (to stop, type the word done):" << endl;
while(cin >> word && word != "done")
number++;
cout << "You entered a total of " << number << " words." << endl;
}
Exercise 5.8
最新推荐文章于 2018-09-13 13:35:42 发布