九本目 さいころ一万回ふる
a = Array.new(10000) normdist = 0.0 max = 0.0 include Math for i in 1..10000 a[i] = rand(6)+1 max += a[i] end ave = max / 10000 print "平均:"+ ave.to_s for i in 1..10000 normdist += (a[i] - ave) * (a[i] - ave) end normdist = sqrt(normdist / 10000) print "\n" print "標準偏差:"+ normdist.to_s