|Write a program to count the number of vowels in a...|General Coding Problems

fn count_vowels(s: &str) -> usize

Easy

Write a program to count the number of vowels in a given string.

fn count_vowels(s: &str) -> usize

Asked in

cognizant

Examples

Example 1:
Input: hello
Output: 2
Example 2:
Input: AEIOU
Output: 5
Submit Result

Click Run to test sample cases, or Submit to evaluate all cases