Created
May 20, 2011 19:51
-
-
Save davejlong/983646 to your computer and use it in GitHub Desktop.
My first Ruby app
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
realNum = rand(10) | |
puts "What is your guess?" | |
checkNum = gets.to_i | |
while checkNum != realNum do | |
if checkNum != realNum | |
puts 'Your guess is wrong. What is your guess?' | |
checkNum = gets.to_i | |
end | |
end | |
puts 'You guessed correctly!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment