请注意:这意味着,与元音不同同,插在中间的字符 H 和 W 不会对组合相同代码的字母形成障碍。
Note that this means, unlike vowels, intervening H and W characters do not act as a barrier to combining runs of letters with the same code.
下两个for循环迭代该字符串并计算其包含多少个元音字母(“a”、“e”、“i”、“o”或“u”)。
The next two for loops iterate through the string and count how many vowels (' a ', 'e', 'I', 'o', or 'u') it contains.
如果该字符与某个元音匹配,则该元音的计数器加1。
If the character matches one of the vowels, add 1 to that vowel's count.
应用推荐