blob: 60c2abc4dc4b7f6c567c764841b15f2fd0072aea (
plain)
1
2
3
4
5
6
7
8
9
10
|
module Main where
main :: IO ()
main = putStrLn $ printFloat 100
printFloat :: Float -> String
printFloat x = f (show (round (x * 10)))
where f "0" = "0"
f _ = show (round x)
|