diff --git a/Ruby/oddoreven.rb b/Ruby/oddoreven.rb new file mode 100644 index 0000000..b195c23 --- /dev/null +++ b/Ruby/oddoreven.rb @@ -0,0 +1,7 @@ +def oddornot(num) + if num.modulo(2) == 1 + puts "Odd" + elsif num.modulo(2) == 0 + puts "Even" + end +end \ No newline at end of file