How do I indicate that an integer is negative?
When I executed the following code and gave x=-1 and y=-2, the result was wrong. It printed "x is less than y." Why is that?
print "Give x. x=" x = gets.chomp print"Give y. y=" y = gets.chomp if x<y print "x is less than y" elsif x>y print "y is less than x" else puts "x is equal to y" end