I am trying to find the highest value for this set of variables but it keeps providing errors. I was wondering if the logic of the statements is wrong and how it can be fixed? h1=3 h3=4 h5=8
if h1>=h3>=h5
puts "example"
elsif h1>=h5>=h3
puts "w"
elsif h3>=h1>=h5
puts "e"
elsif h3>=h5 >=h1
puts "yeah"
elsif h5>=h1>=h3
puts "cool"
elsif h5>=h3>=h1
puts "bish"
end
Aucun commentaire:
Enregistrer un commentaire