0
Argentina Code Solution: Help Needed
I can get 3 out of 5 tests to run correctly but now I am stuck. What am I missing? peso=gets.chomp.to_i dollar=gets.chomp.to_i #peso/50 = dollar if #{peso}/50 > #{peso} puts "Pesos" if #{peso}/50 < #{peso} puts "Dollars" end end
1 Answer
+ 2
There are 2 cents for every peso. So to convert to dollars (100 cents per dollar) you convert pesos to cents (pesos*2) then convert your cents to dollars (cents/100). Now you can compare using an if-else.