DEV Community

pooyaalamdari
pooyaalamdari

Posted on

if condition

print "Enter an integer: "

n = gets.to_i 

if n > 0
    puts "your number is positive"
elsif n < 0
    puts "your number in negative"
else 
    puts "your number is zero!"
end
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
nlxdodge profile image
NLxDoDge

What language is this?