Learner
0
Q:

ruby if statement

x = 1
if x > 2
   puts "x is greater than 2"
elsif x <= 2 and x!=0
   puts "x is 1"
else
   puts "I can't guess the number"
end
3
if condition
	expression
1
if condition
  expression
else
  expression
-1

New to Communities?

Join the community