このページに関してのお問い合わせはこちら
Ruby 初心者スレッド Part 15
ツイート
660
:
デフォルトの名無しさん
:
2007/11/26(月) 19:06:40
やばすさん
できたよ
a = Array.new
10.times do
a.push(rand(10))
end
a.each_with_index {|x, idx|
print "[#{idx}]:#{x}\n"
}
print "最大値は#{a.max}です♪\n"