Created
September 17, 2015 01:42
-
-
Save anonymous/12c57c28aff452442929 to your computer and use it in GitHub Desktop.
code
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
while | |
num1=rand(10) | |
num2=rand(10) | |
puts "#{num1}*#{num2} ?" | |
answer=gets.chomp | |
answer.to_i | |
correct_answer=num1*num2 | |
if answer==correct_answer | |
puts " " | |
puts " " | |
puts "Correct!" | |
puts " " | |
puts " " | |
else | |
puts " " | |
puts " " | |
puts "WRONG!!! Think about it and try again" | |
puts " " | |
puts " " | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment