Format the number 7/8 as a decimal with 2 places: 0.88
ruby (7.0/8.0*100).round/100.0
(7.0/8.0*100).round/100.0
ruby 1.9+(7.0/8.0).round(2)
(7.0/8.0).round(2)
Submit a new solution for
ruby
There are 29 other solutions in
additional languages (
clojure,
cpp,
csharp,
erlang ...)