You need to use two different variables, one to hold the number of integers and one array to hold the entered values.
For example:
int numberOfIntegers = 0;
int enteredValues[50];
Code to get the number of integers:
printf("Please enter the number of integers you wish to enter\n");
scanf("%d", &numberOfIntegers);
When you know the number of integers, you can use a loop to ask the user to input the correct number of values and store them in the array.
Don't forget to check that the number of integers are smaller than the length of the array.