Return Boolean
def is_odd(n : Int32)
return n % 2 == 1
end
puts is_odd(3)
puts is_odd(4)
def is_this_odd?(n : Int32)
return n % 2 == 1
end
puts is_this_odd?(3)
puts is_this_odd?(4)
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
def is_odd(n : Int32)
return n % 2 == 1
end
puts is_odd(3)
puts is_odd(4)
def is_this_odd?(n : Int32)
return n % 2 == 1
end
puts is_this_odd?(3)
puts is_this_odd?(4)