Make a loop that iterates through every character in your string (convert your string into an array and read each value into a char). If the letter is a consonant, increment the consonants integer by 1. Do the same for vowels and words. For spaces, count the number of spaces and add one.
No comments:
Post a Comment