Difference between revisions of "Vowel Counter"

From CompSciWiki
Jump to: navigation, search
m
Line 6: Line 6:
 
|SideSectionTitle=String Methods and Debugging
 
|SideSectionTitle=String Methods and Debugging
 
|SideSection=
 
|SideSection=
[[Image:Wiki_array02.jpg|center]]
+
[[Image:Wiki_array02.jpg|center]]<BR>
<BR>
+
  
 
|Solution=I still have to do the solution write-up...
 
|Solution=I still have to do the solution write-up...

Revision as of 14:21, 9 April 2010

Back to the Program-A-Day homepage

Problem

Your task is to write a program that takes a string of input from the user, and then count the number of vowels that are contained within this string. As output, provide the user with the final count of vowels, as well as the percentage of all characters in the string that these vowels represent. Repeat this until the user either cancels the input, or enters an empty string. For the purposes of this question, you may treat 'y' as though it is always a consonant (ie, just treat 'a', 'e', 'i', 'o', and 'u' as vowels).

 

String Methods and Debugging

Wiki array02.jpg

Solution

I still have to do the solution write-up...

Code

Solution Code

Back to the Program-A-Day homepage