pages:
  • 1
Samin Heydarian SAYS

What's wrong with it?

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        double sum =0;
        int i = 0;
        while (i < 12){
            sum += scan.nextDouble();
            i++;
        }
        System.out.printf("$" + "%.2f", sum/12);
    }
}