Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 13 lines (12 sloc) 0.237 kB
aeebe27 @twessels initial commit
authored
1 answer = rand(10) + 1
2 puts "Guess a number: "
3 guess = gets.to_i
4 while (true)
5 if (guess == answer)
6 puts "Correct"
7 break
8 end
de1f18c @twessels Updates to chapter 2 problems
authored
9 puts "Too high" if (guess > answer)
10 puts "Too low" if (guess < answer)
aeebe27 @twessels initial commit
authored
11 guess = gets.to_i
12 end
Something went wrong with that request. Please try again.