Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func numberOfVowels(in string: string) -> Int {
- for numberofvowels in string.lowercase() {
- var numberofvowels = 0
- switch vowel {
- case"a":
- case "a","e","i","o","u":
- numberofvowels = numberofVowels + 1
- default :
- break
- }
- }
- }
- return numberofvowels
- numberofvowels( in: "the code challenge"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement