How do I get to haskell to output numbers NOT in scientific notation?

前端 未结 2 893
夕颜
夕颜 2020-12-18 21:18

I have a some items that I want to partition in to a number of buckets, such that each bucket is some fraction larger than the last.

items = 500
chunks = 5
i         


        
2条回答
  •  情话喂你
    2020-12-18 22:09

    Try printf. e.g.:

    > import Text.Printf
    > printf "%d\n" (23::Int)
    23
    > printf "%s %s\n" "Hello" "World"
    Hello World
    > printf "%.2f\n" pi
    3.14
    

提交回复
热议问题