Haskell Converting Int to Float
问题 I'm having some problem with one of the functions which I'm new at, it's the fromIntegral function. Basically I need to take in two Int arguments and return the percentage of the numbers but when I run my code, it keeps giving me this error: Code: percent :: Int -> Int -> Float percent x y = 100 * ( a `div` b ) where a = fromIntegral x :: Float b = fromIntegral y :: Float Error: No instance for (Integral Float) arising from a use of `div' Possible fix: add an instance declaration for