Skip to content

Instantly share code, notes, and snippets.

@Dgrady3
Created January 2, 2014 21:20
Show Gist options
  • Save Dgrady3/8227148 to your computer and use it in GitHub Desktop.
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
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 + '.'
@KushAmin
Copy link

Write a program that asks for a sentence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment