#include<iostream>
#include<cstring>
int main()
{
using namespace std;
char word[20];
int sum = 0;
cout << "Enter words (o stop, type the word done):\n";
cin >> word;
while(strcmp(word, "done")) // 比较傻的方法 注意是成立的时候
// while为零
{
sum ++;
cin >> word;
}
cout << "You entered a total of " << sum << "words.n";
return 0;
}