简单的不能再简单的题目, 不过倒是可以来练练新学的JAVA..
import java.util.Scanner; public class Hello{ public static void main(String[] args) { // TODO Auto-generated method stub double[] a; double s = 0; a = new double[13]; Scanner in = new Scanner(System.in); for(int i = 0; i < 12; i++){ a[i] = in.nextDouble(); s += a[i]; } s = (double)s/12; System.out.printf("$%.2f", s); System.out.println(); } }