C two-dimensional array based on user input
<p>I'm trying to assign user input using a two-dimensional array that takes five numbers and squares them. The program should calculate and store the squared values for each user in the array. </p>

<p>I'm getting the right output with the current code but I can't figure out how to assign the input to the array, without getting errors in the output. </p>

<pre><code>#include &lt;stdio.h&gt;

int main(void)
{
    int disp[2][5];

    int x, y;
    printf("Please enter 5 integer values:\n");

    for(x=0; x&lt;=2; x++) {

        for (y=0; y&lt;=5; y++) {
            scanf("%d", &amp;x);
            printf("[ %d ][ %d ]\n", x, x*x);
        }
    }

    return 0;
}
</code></pre>