DEV Community

loading...

Discussion on: Daily Challenge #3 - Vowel Counter

Collapse
ganderzz profile image
Dylan Paulus • Edited

Nim

from unicode import toLower

proc countVowels(input: string): int =
  for i in toLower(input):
    if i in "aeiou":
      result += 1

if isMainModule:
  const input = "@PPLes!43"

  echo countVowels(input)