~ruby
def my_dice
a = gets.to_i % 10
b = (rand * 10 + 1).to_i
if a == b then
puts "비겼네요"
else if a> b then
puts "내가 이겼음"
else puts "쟤가 이김"
end
end
puts a
puts b
end
Retrieved from http://wiki.zeropage.org/wiki.php/데블스캠프2011/넷째날/루비/김준석 last modified 2021-02-07 05:29:11