The Student Room Group

GCSE Computing: Pseudo Code help?

I need to write a pseudo code which counts the number of vowels and consonants and outputs the number of each, when a word is entered?

Please help, thank you :smile:
Reply 1
Original post by COMPsCI4LIFE
I need to write a pseudo code which counts the number of vowels and consonants and outputs the number of each, when a word is entered?

Please help, thank you :smile:


maybe store each character of the inputted word into an array, then for each character in the array do an if statement that checks whether it is 'a', 'e', 'i', 'o' or 'u' and if it is any of those, increase the value of a variable that acts as a vowel counter by one; else increase a consonant counter by one then print the counter values

Quick Reply

Latest

Trending

Trending