/* This program computes the average of one or more
  numbers, which are supplied by the user.
  
  Recall, the comments were filled in by you.
*/

//

import java.util.Scanner;

//
class ComputeAverage {
	//
	public static void main(String [] args) {
		//
		System.out.println("Enter the numbers, separated by spaces, then press enter. ");
		//
		Scanner s = new Scanner(System.in);
		//
		int howMany = 0;
		double sum = 0;
		//
		String input = s.nextLine();
		//
		Scanner numbers = new Scanner(input);
		
		//
		//dont' worry about the "while" thing, 
		//it basically keeps the Scanner going at reading all of the integers the user had entered
		while(numbers.hasNextInt() ) {
			//
			//
			sum = sum + numbers.nextInt();
			//
			howMany = howMany + 1;			
		}
		//
		//
		System.out.println("The average of " + howMany + 
				   " numbers you entered was: " + sum/howMany);
	}
}
