nick34992
5/21/2016 - 8:09 PM

Conditional - Ruby

Conditional - Ruby

print "Enter an Interger: "
anInt = Integer(gets.chomp)

if anInt < 0
  puts "#{anInt} is a negative integer!"
elsif anInt > 0
  puts "#{anInt} is a positive integer!"
else
  puts "#{anInt}, also known as ZERO!"
end