public class LoopAverages

{

public static void main(String[] args)

{

Scanner reader = new Scanner(System.in);

double num, average, total = 0;

int numbers, choice;

System.out.println("Welcome to the Average Calculator.");

System.out.println("Please enter the number of numbers you want to find the average of.");

numbers = reader.nextInt();

do

{

System.out.println("Please enter " + numbers + " numbers.");

num = reader.nextDouble();

total = total + num;

average = total/numbers;

System.out.println("Press 0 to stop entering numbers, or any other number to continue");

choice = reader.nextInt();

}while(choice != 0);

}

}

I need to code an average calculator where the user can enter as many numbers as they want and find the average, but when i run it, it wont let me enter all of the numbers! Also, i needed to put in the option to press 0 to break the program but it just comes after the numbers and prevents me from entering them in... HELP ME!!!