title: Calling Method adding input
body: <p>I'm writing a program in which the user inputs 10 numbers, and they are added together as they are input and then the average is displayed. So far I have this, and I'm stuck as to what to put in the loop body to achieve this. Thanks!</p>
  
  <pre><code>import java.util.Scanner;
  
  public class InputMethod
  {
  public static void main(String[] args)
  {
      int loop_Value;
      int end_Value = 10;
      for(loop_Value =0; loop_Value &lt; end_Value; loop_Value++)
      {
          readInteger();
  
      }
  }
  
  private static int readInteger()
  {
      Scanner scan = new Scanner(System.in);
      System.out.println("Enter an integer");
      while (!scan.hasNextInt()) 
      {
          scan.next();
          System.out.println ("Bad input. Enter an integer");
      }
      int input = scan.nextInt();
      {
          return input;
      }
  
  }
  </code></pre>
  
  <p>}</p>