Created
May 3, 2017 03:55
-
-
Save stevenocchipinti/b1735c00ee6d35c8c2438770685a6a65 to your computer and use it in GitHub Desktop.
Number guessing
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
require 'io/console' | |
print "Player 1, pick a number: " | |
number = STDIN.noecho(&:gets) | |
puts | |
puts "Player 2, try to guess the number!" | |
print "Guess: " | |
guess = gets | |
puts number == guess |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment