请指教!!谢谢
想从1930和1950之间取到乱数.该怎么写str = ''
while str !='BYE'
str = gets.chomp
if str != str.upcase
puts 'aaa'
else
if str == str.upcase and str != 'BYE'
puts ('a' + rand(1930-1950) + '年CCCC')
end
end
end
puts 'BYE BYE' 1930 + rand(21):mrgreen:
页:
[1]