Graderpractice for programmers

Back to 273387 Swift - Functions

Starting vowels

Problem

Write a function that takes an array of strings and counts how many start with a vowel (a, e, i, o, u).

Use the following code as a template:

import Foundation

// TODO: write your function here

let inputString = readLine() ?? ""
let input: [String] = inputString.components(separatedBy: ",")
let result: Int = countStartVowels(list: input)
print(result)

Examples

Input

ape,frog,insect

Output

2

Input

ape,elephant,insect

Output

3

Submit your solution

swift