Int To Float Haskell

[Solved] Int To Float Haskell | Haskell - Code Explorer | yomemimo.com
Question : int to float haskell

Answered by : al-arafat-tanin

-- Int to Float
-- Useing (/)	(/) :: Fractional a => a -> a -> a
{- The following code works: -}	percent :: Int -> Int -> Float	percent x y = 100 * ( a / b ) where a = fromIntegral x :: Float b = fromIntegral y :: Float

Source : | Last Update : Wed, 09 Jun 21

Answers related to int to float haskell

Code Explorer Popular Question For Haskell