Why is division in Ruby returning an integer instead of decimal value?
For example:
9 / 5 #=> 1
but I expected 1.8
. How can I get the correct decimal (non-integer) result? Why is it returning 1
at all?
For example:
9 / 5 #=> 1
but I expected 1.8
. How can I get the correct decimal (non-integer) result? Why is it returning 1
at all?