Created
January 2, 2014 21:20
-
-
Save Dgrady3/8227148 to your computer and use it in GitHub Desktop.
Basic ruby program that asks for your favorite number, then tells you a better number
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?" | |
num = gets.chomp | |
better = num.to_i + 1 | |
puts "Your favorite number is okay, here is a bigger, better favorite number: " + better.to_s + '.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Write a program that asks for a sentence.