From: Aldric Giacomoni Date: 2010-03-12T03:29:18+09:00 Subject: Re: convert s to i, then + 1 Charlie Ca wrote: > this is the code I use; > > puts 'Whats your favorite number?' > num = gets > puts (num.to_i + 1).to_s + ' is my favorite number. It one ups your > fav!' > > Simple and Straightforward. I attached it to. puts "What is your favorite number? num = gets.to_i = 1 puts "My favorite is #{num}. Hah! They should call you Mario 'cause you've been one-upped!" Alright, so I'm not showing anyone anything new, but I made a funny. -- Posted via http://www.ruby-forum.com/.