Ruby初心者スレッドPart4
■ このスレッドは過去ログ倉庫に格納されています
0145デフォルトの名無しさん
2006/01/31(火) 21:19:05ask=''
while ask=gets.chomp
if ask == 'BYE'
then
year=(1950+rand(21)).to_s
puts "いやー、"+year+ "年以来ないねー!"
count = count + 1
else
puts "は?! もっと大きな声で話しておくれ、坊や!"
count = 0
end
if count == 3
then
exit
end
end
■ このスレッドは過去ログ倉庫に格納されています