1) In CS50 ide, it does not even compile giving error: format specifies type
'int *' but the argument has type 'int' [-Werror,-Wformat]
scanf (" %d", array[n]);
2) In codeblocks, it runs and I am able to read in to howMany variable but then gives seg fault after it asks for the first number to be read
# include <stdio.h>
# include <stdlib.h>
int main(void)
{
int n, howMany;
float total = 0;
float average = 0;
printf(" How many numbers you want to Enter\n");
scanf(" %i", &howMany);
int array[howMany];
for (n=0; n < howMany; n++)
{
printf("enter a number: ");
scanf (" %d", array[n]);
total += array[n];
}
average = total/howMany;
printf ("average of all numbers entered is %f\n", average);
}