title: i want to find sum of array first and last element and 2nd and 2nd last element and 3rd and 3rd last element and so on
body: <p>here remember array size and values is defined by user by the help of scanner class and i am using java
  task is to find sum of first and last element and 2nd and 2nd last and so on 
  i already try research but failed 
  thanks in advance</p>
  
  <pre><code>int sum = 0; 
  int f = 0;
  System.out.println("Your Array is even");
  System.out.println("Kinldy enter Your Values of Array");
  for(int i = 0 ; i&lt;array.length ; i++) 
  {  
      array[i] = s.nextInt();
      for(int j = 0 ; j&lt; array.length-i-1 ; j++)
      {
          sum = j + array.length+1 ;
      }
  }    
  System.out.println("Your Sum " + sum);
  </code></pre>