You are viewing a single comment's thread. Return to all comments →
Ruby :-]
puts arr.count {|n| n > 0} / n.to_f puts arr.count {|n| n < 0} / n.to_f puts arr.count {|n| n == 0} / n.to_f
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →
Ruby :-]