mercredi 15 juin 2016

Code should return highest of two numbers entered by the user

i am new to Ruby and i dont know where my fault is. This is the code.

puts "Give me a number"
one = gets.chomp
puts "Give me another number"
two = gets.chomp

if one > two
    puts "This is the bigger number #{one}"
else
    puts "This is the bigger number #{two}"
end

Aucun commentaire:

Enregistrer un commentaire