What's wrong here?


#1

What's wrong here?

if 0 > 3
    puts "0 is greater than 3!" 

elsif 0 = 3
     puts "0 is equal to 3!"

else 
     puts "0 is less than 3!" 
end

Elsif
#2

Hi next time it's better if you create a new topic.....

THEN

here

elsif 0 = 3

you should change the = with == Because...

= is to asign a value to a variable
== is to compare two value


#3

else 0 < 3

puts " 0 is less than 3!"


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.