#include<iostream>
#include<math.h>
#include<string>
//#include <array>
using namespace std;
void main()
{
<span style="white-space:pre"> </span>string str ;
<span style="white-space:pre"> </span>string t="done";
<span style="white-space:pre"> </span>int n=0;
<span style="white-space:pre"> </span>cout<<"Enter words (to stop,type the word done)"<<endl;
<span style="white-space:pre"> </span>cin>>str;
<span style="white-space:pre"> </span>while(str!=t)
<span style="white-space:pre"> </span>{
<span style="white-space:pre"> </span>n++;
<span style="white-space:pre"> </span>cin>>str;
<span style="white-space:pre"> </span>cin.get();
<span style="white-space:pre"> </span>}
<span style="white-space:pre"> </span>cout<<"You enter a total of "<<n<<" words.";
}