Range in Array Java
<p>I need to complete this task. But I am not entirely sure how to get the range into the array. I think I am supposed to use a loop somehow but I do not get it to work.</p>

<p>This is what I have so far:</p>

<pre><code>import java.util.*;
public class A2_1 
{
    static Scanner x = new Scanner(System.in);
    public static void main(String[] args) 

    {
        int [] myArray = new int [1000000];     
        int x;

    for ( x = 0; x &lt;= 100; x++)
    {  
        myArray [x] = x+1;
    }
    System.out.println(myArray);
    }
}
</code></pre>

<p>This is the task:</p>

<p>"Create a program that generates 1,000,000 integer random values in the range of [1,..,100] and for any given x (between 1 and 100) taken from the user input computes "(     ℎ    )/1,000,000".
This value must be comparable to the CDF of a uniform distribution U[1,100] at point x."</p>