Write a brute force algorithm for counting the number of vowels in a given text
Answers
Answered by
0
Search it on Google it Will help you more.
Answered by
1
Answer:
Logic: Here variable ‘vowels’ is incremented whenever a vowel found in tracing. Logic behind this is very simple, that comparing each character to the set of vowels, predefined in an array. If this character is in the set of vowels then it implies that character is a vowel, so we increment the count by one.
Same logic can be applied to find the existence of any letter set in the predetermined array.
Similar questions