brewersfan1976

improper_fraction_to_mixed.rb

Feb 26th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.16 KB | None | 0 0
  1. def improperFractionToMixed(a)
  2.     array = Array.new
  3.     array[0] = (a[0] / a[1]).to_i
  4.     array[1] = a[0] % a[1]
  5.     array[2] = a[1]
  6.     return array
  7. end
Advertisement
Add Comment
Please, Sign In to add comment