[edit]The line numbers below refer to your post #33
line 30 is showing the value of total before that value has been calculated. Why don't you move that line down to line 110. And it will show the sum of all values for not only the current sentence (or word actually) but all the words read before it. If you want to show the total for just the word that is being displayed then you will need to use a different variable. Since total is already accumulating the value in all those case statements then maybe create another int and name it something like grandTotal then sum it on line 111 and reset total on line 112. Insert the lines below at line 110.
line 111: cout<<"Words"<<setw(30)<<"Value"<<endl<<endl;
line 112: grandTotal += total;
line 113: total = 0;
You will also have to change line 115 to use grandTotal instead of total