题解 | #平均身高#
平均身高
http://www.nowcoder.com/practice/b0e489a749f448e2b37f26ef56a76e58
题解思路
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sin = new Scanner(System.in);
double sum = 0.0;
for(int i=0;i<5;i++){
// double d = sin.nextDouble();
sum += sin.nextDouble();
}
double d = sum / 5;
System.out.println(String.format("%.2f",d));
}
}