#include<iostream>
#include<cstring>
using namespace std;
void main()
{
int counter = 0;
char ch[10]="0";
cout << "Enter words (to stop,type the word done):" << endl;
cin >> ch;
while (strcmp(ch,"done")!=0)
{
cin >> ch;
counter++;
}
cout << endl << counter << "characters read\n";
}
#include<cstring>
using namespace std;
void main()
{
int counter = 0;
char ch[10]="0";
cout << "Enter words (to stop,type the word done):" << endl;
cin >> ch;
while (strcmp(ch,"done")!=0)
{
cin >> ch;
counter++;
}
cout << endl << counter << "characters read\n";
}