View Problem

Format a decimal number

Format the number 7/8 as a decimal with 2 places: 0.88
ExpandDiskEdit
erlang
Formatted = io_lib:format("~.2f", [7/8]),
ExpandDiskEdit
erlang
io:format("~.2f~n", [7/8]).
ExpandDiskEdit
fantom
formatted := (7.0/8.0).toLocale("0.00")

Submit a new solution for erlang or fantom
There are 28 other solutions in additional languages (clojure, cpp, csharp, fsharp ...)