Forked from Dgrady3/Bigger Better Favorite Number
Last active
February 6, 2020 18:25
-
-
Save rwmotivation/a0efc51cd7ed3e8ca98518febd716b85 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 hidden or 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