Write a program which checks input numbers and determines whether a number is even or not.
Your program should accept as its first argument a path to a filename. Input example is the following
701 4123 2936
Print 1 if the number is even or 0 if the number is odd.
0 0 1
All numbers in input are integers > 0 and < 5000.
#!/usr/bin/env ruby -w ARGF.each_line do |line| puts(line.chomp[-1].to_i.even? ? 1 : 0) end