Created
April 18, 2011 12:49
-
-
Save jcasimir/925266 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "What is your favorite number?" | |
favenum = gets.chomp | |
# Using Interpolation | |
puts "Well that looks great, but wouldn't #{favenum.to_i + 1} be better?" | |
# Using Concatenation | |
puts "Well that looks great, but wouldn't " + (favenum.to_i + 1).to_s + "be better?" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment