View Problem

Format a decimal number

Format the number 7/8 as a decimal with 2 places: 0.88
DiskEdit
ruby
(7.0/8.0*100).round/100.0
DiskEdit
ruby 1.9+
(7.0/8.0).round(2)

Submit a new solution for ruby
There are 29 other solutions in additional languages (clojure, cpp, csharp, erlang ...)