For my hwk, I have to count the number of vowels, constants, capitals, and lowercase letters in a string of characters. I have to make 4 functions for this code and it is suppose to count in there.
So it reads the string, but when I run it, it looks like it only reads one of the character from the string. So my question for this is how do I read all the characters from the string that gets read in and counts the vowels, constants, etc.?
Thanks in advance.
Where are your return statements?
At the end of each count* function?
Inside loops?
Your program loops through the string four times. That is ok, but there is an alternative design.
One loop that calls all isVowel(char), isCapital(char), etc functions.