From: Joe <qbproger@gmail.com>
Date: December 2, 2007 5:33:25 PM CST
To: submission@rubyquiz.com
Subject: Please Forward A Ruby Quiz SubmissionSubmission for Postfix to Infix.
stack = Array.new
ARGV.first.split.each do |n|
if n.match(/[\d\.]+/) then
stack.push n
else
a,b = stack.pop,stack.pop
stack.push "(#{b} #{n} #{a})"
end
endputs stack.first
Joe
···
Begin forwarded message: