They are:
1. You'll have to "trim" blank spaces at the beginning and/or the end of every word. I made this one in Pascal, and I only read valid chars to build the words.
I believe the input MAY have words with blank spaces at the beginning or end of words.
2. Your code prints an extra blank line at the end of the output. That should only represent a P.E., not a W.A.
Just use a bool Flag = false; or a counter, like:
[cpp] n=atoi(word2.original);
if (Flg)
cout << endl;
Flg = true;[/cpp]
That's all my C++ knoledge can do for you rigth now
![:wink:](./images/smilies/icon_wink.gif)
Hope that helps.