计算数组元素的平均值

let mut sum:f64 = 0.0;
for i in 0..a.len(){
	sum += a[i] as f64;
}
let average:f64 = sum/(a.len() as f64);
print!("{}",average);
if a.len() > 0 {
	//真正的核心算法
} else {
	print!("数组为空");
}