#include<iostream>
#include<string>
int main()
{
using namespace std;
string word;
int sum = 0;
cout << "Enter words (to stop, type the done); \n";
cin >> word;
while (word != "done") // 上一题的进化 string 好用啊
{
sum ++;
cin >> word;
}
cout << "You entered a total of" << sum << "words.\n";
return 0;
}
08-26