Hi ive got an assignment that asks the user to input sets of data (x,y) and then stores them in an array and does various things with them, the program asks for the number of data sets to be entered (so that i know how big the array will be), the number of data sets must be a positive integer , so i wanted to put and 'if' statement that printed an error message if the user inputted zero or a negative number, it works fine for zero, -1 , -2 and -3 , but anything below -3 and the program shuts down, cant work out why its doing that, would appreciate any tips in figuring it out

Heres my code:
Code:
#include<Stdio.h>

int x,y,N;
int main()

{


    printf("How many pairs of sets of data are there?(note:must be a positive integer): ");
    scanf("&#37;d",&N);
    if (N<=0) printf("Error Restart program");



    float array [N][2];


    for (x=0;x<N;x++)

        {
            printf("Enter the two values of the data set (leave a space inbetween)  :  "); /* does work if you put minus numbers in*/
            scanf("%f%f",&array[x][0],&array[x][1]);
            printf("\n");

            /*printf("(%f,%f)\n",array[x][0],array[x][1]);  omit this line in final program*/
        }

        printf("   x       y");
        printf("\n\n");
        for (x=0;x<N;x++)
{
    printf("%6.2f %6.2f\n",array [x][y],array [x][y+1]);
    printf("\n");

}
    printf("You entered the above data sets");
    printf("\n");
Thank you

Tegan