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);
}
}
Login please!
In order to post something you must login first. You can use the form in the top of this page.