Format the number 7/8 as a decimal with 2 places: 0.88
fantom formatted := (7.0/8.0).toLocale("0.00")
class SolutionXX
{
Void main()
{
formatted := (7.0/8.0).toLocale("0.00")
}
}
Submit a new solution for
fantom
There are 30 other solutions in
additional languages (
clojure,
cpp,
csharp,
erlang ...)