Never mind....

.....
Last edited on
What have you got thus far? Or do you want one of us to make it for you?
Just use the function that counts vowels.
1
2
3
4
5
int main(){
 
int x = countVowel("This is an example", 'o');
cout << x;
}


Don't forget to include the proper headers
Last edited on
Here is a full program, that does what you need. You input a word or sentence, and the program lets you know how many letters there were, how many vowels, consonants and punctuations. I wrote this for my daughters C++ class.

[ code removed so as not to do peoples homework for them ]

Hope this helps..

( This works under MS Visual C++ 2008 Express. If you use something different, you may need to make a few changes.. )

whitenite1
Last edited on
Sorry I asked...
Last edited on
Okay, here is a corrected version for you. I got rid of punctuation and any of the fancier stuff. Now it checks ONLY for the 5 vowels, and prints out as you specified in your post. I compiled it with MS Visual C++ 2008 Express, and it works. Hope you can still use it..

[ code removed so as not to do peoples homework for them ]

whitenite1
Last edited on
Need to not do his homework for him... Particularly like the example string he includes
Topic archived. No new replies allowed.