c++ primer plus 6.1
char ch;
int spaces=0;
int total=0;
cin.get(ch);
// while(cin.get(ch)!='.'){
while(ch!='.'){
if(ch==' '){
spaces++;
}
total++;
cin.get(ch);
}
cout<

c++ primer plus 6.1
char ch;
int spaces=0;
int total=0;
cin.get(ch);
// while(cin.get(ch)!='.'){
while(ch!='.'){
if(ch==' '){
spaces++;
}
total++;
cin.get(ch);
}
cout<