module Main where import Data.Char import Data.List import Text.Printf isVowel :: Char -> Bool isVowel c = toUpper c `elem` "AEIOU" main :: IO () main = do content <- getContents let (vowels, consonants) = partition isVowel $ filter isAlpha content let total = fromIntegral $ length vowels + length consonants printf "Vowels : %.2f\n" (fromIntegral (length vowels) / total :: Float) printf "Consonants: %.2f\n" (fromIntegral (length consonants) / total :: Float)