Format the number 7/8 as a decimal with 2 places: 0.88
clojure (format "%3.2f" (/ 7.0 8))
(format "%3.2f" (/ 7.0 8))
clojure (* 0.01 (Math/round (* 100 (float (/ 7 8)))))
(* 0.01 (Math/round (* 100 (float (/ 7 8)))))
Submit a new solution for
clojure
There are 29 other solutions in
additional languages (
cpp,
csharp,
erlang,
fantom ...)