var q = [45,12,20,31,75,9,51,91];
var w = 0;
for(var i = 0; i <= q.length - 1; i++){
w += q [i];
}
console.log("相加等于:"+w);
var p = w / q.length;
console.log("平均值等于:" + p);
var q = [45,12,20,31,75,9,51,91];
var w = 0;
for(var i = 0; i <= q.length - 1; i++){
w += q [i];
}
console.log("相加等于:"+w);
var p = w / q.length;
console.log("平均值等于:" + p);
info 还没有任何评论,你来说两句呐!