//
#include <iostream>
void main ()
{
char c;
int num(1);
puts ("Enter text. Include ('.'or'?'or'!') in a sentence to exit:");
do
{
c=getchar();
putchar (c);
if((c==' ')||(c==',')||(c=='-'))
num++;
}
while ((c != '.')&&(c !='!')&&(c != '?'));
std::cout<<"\nNumber of the words "<<num<<"\n";
}
//