Count the Alphabet

From CompSciWiki
Revision as of 10:45, 8 April 2010 by LesE (Talk | contribs)

Jump to: navigation, search

Back to the Program-A-Day homepage

Problem

Loop through the alphabet to count how many consonants and vowels there are. Print a separate statement for each count.

Remember: A char acts much the same way as an int does. You can perform arithmetic with char just like you can with an int.

 

While and For Loops

Wiki loops03.jpg

Solution

Code

Solution Code

Back to the Program-A-Day homepage