できたらねん(無担保無利子無補償)
一応cでやってみるけど、たぶんjavaでやる(c忘れたw
//2.平均を出力
for (int i=0; i<length; i++) {
total = total + num[i];
}
ave = total/length;
System.out.println("平均は" + ave);
//3.標準偏差を出力
total = 0;
for (int i=0; i<length; i++) {
total += (num[i]-ave)*(num[i]-ave);
}
bunsan = total /length;
hyoujun = Math.sqrt(bunsan);
System.out.println("標準偏差は" + hyoujun);
最終更新:2012年01月26日 10:48