Last active
December 24, 2015 00:09
-
-
Save fijimunkii/6715190 to your computer and use it in GitHub Desktop.
ruby: ask question
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
def ask(question) | |
puts question | |
user_input = gets.chomp | |
end | |
def ask_num(question) | |
ask(question).to_f | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment