Assignment 5

Due (Online) Wed, Oct 11, 06, by 8:00 PM.


Write a C++ program to do the following

 

·        It reads in a string (using the extraction operator) and displays the number of vowels in the string and removes all vowels from s (the new string with the vowels removed should be stored in a string called t), then it displays t. (Recall that the vowels are u,U, e,E, i, I, o, O, a, A.) Note that if you don't store the new string in t, you may be given no credit. For example, if s="Iyad", then t should be "yd"; if s="Fredonia", then t should be "Frdn".

 

·        Then it asks the user whether he/she wants to continue. If the user enters y or Y, then it repeats the whole process. If the user enters something else, it stops executing.

 

Here are sample runs:

 

Enter a string:

Iyad

 

2 vowels removed from Iyad. After removing the vowels, the string becomes:

yd

 

Continue? If yes, press y or Y: y

 

Enter a string:

SUNY

 

1 vowel removed from SUNY. After removing the vowels, the string becomes:

SNY

 

Continue? If yes, press y or Y: y

 

Enter a string:

Fredonia

 

4 vowels removed from Fredonia. After removing the vowels, the string becomes:

Frdn

 

Continue? If yes, press y or Y: n

 

Press any key to continue ...