From: "Matthew K. Williams" Date: 2010-01-16T01:37:20+09:00 Subject: Re: Please Help I'm new in Ruby -- Input Problem --8323329-1315195307-1263574148=:23210 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1315195307-1263574148=:23210" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1315195307-1263574148=:23210 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 16 Jan 2010, Nolly Mejia wrote: >> >> Your console output is probably being buffered by line. Try putting a >> \n in the string and see if that solves the problem. >> >>> Thank you! >>> Nolly >> >> Best, >> --=C2=A0 >> Marnen Laibow-Koser >> http://www.marnen.org >> marnen@marnen.org > > Hi Marnen, > > Thank you for helping I really appreciate, but I still have the same > problem. > Here's the output when I placed \n > > 3 > 2 > Please enter number 1 : > Please enter number 2 : > Answer : 5 > > I have Final Report on my class, regarding aspiring programming > language. I hope some one can find way. Try replacing print with puts It does look as though your output is being buffered. Which is odd.=20 You may need to add explicit STDOUT.flush after your print statements. Matt --8323329-1315195307-1263574148=:23210-- --8323329-1315195307-1263574148=:23210--