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

fn count_vowels_consonants(s: &str) -> (usize, usize)

Easy

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

fn count_vowels_consonants(s: &str) -> (usize, usize)

Asked in

infosys

Examples

Example 1:
Input: hello
Output: 2 3
Example 2:
Input: aeiou
Output: 5 0
Submit Result

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