title: Outputting the position of multiple array values. The position not the value itself
body: <p>I am trying to create a programm which output all the positions of an array that are bigger than a variable in value. So far.
  I have done the following: With the scanner I define the length of the array. The second scanner is to enter the values. So if the length of the array was 5, I could for instance enter -&gt; 5,4,3,7,8.</p>
  <p>The main function of the programm:
  Through a third scanner, I add a value. This value defines what is being outputted at the end which are all the positions of the array which are higher in value than the value that we added through the last scanner.</p>
  <pre class="lang-none prettyprint-override"><code>Example: INPUT: 5   1 5 3 4 2   3
           OUTPUT: 1 3 
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>import java.util.Scanner;
  
  public class Output_Limit {
      public static void main(String[] args) {
  
          Scanner sc = new Scanner(System.in);
          int index;
          int number;
          int[] field;
          int value;
          int output;
          
  
          {
              number = sc.nextInt();
              field= new int[number];
  
          }
          index=0;
          while (index &lt; number) {
              field[index] = sc.nextInt();
  
              index++;
          }
  
          value= sc.nextInt();
          output=0;
  
          if ( index &lt; value - 1 ) System.out.println(&quot;-&quot;);
          index=index+1;
          System.out.println(index);
  
      }
  }
  </code></pre>