Hello,I'm fairly new with C programming and I'd appreciate any help. My aim is to be able to "Read a series of integers from a keyboard into a 1-D array,then display on screen. Then ask the user(to enter a number). Then,my code should be able to add the of add the sum from negative to positive(of the number) all inclusive. The array size of the array is 400.

So far, here is what I have done.When I run the code,it displays only the "Enter a number:" prompt and that's it. I'm yet to add the counter/sum code(which I'm having trouble with) but as said,any help will be appreciated.Thanks.

Code:#include<stdio.h> #include<string.h> int main(void) { int array[100]; int i; int max; int nvalue; int sum; /*I'm trying to make system print numbers less than and equal to 100 in an array. When that is done it must ask the user for an imput(n),then calculate the sum of numbers in the array between –n and n inclusive.*/ printf("Enter some integers here:"); for (i=0;i<100;++i) { scanf("%d",&array[i]); if(array[i]==-1) { max=i; break; } max=100; } for(i=0;i<100;++i) { printf("\n%s",array[i]); } while(nvalue<max) { nvalue>0; nvalue<100; scanf("%d"); printf("Please try again"); /* Lets calculate the sum*/ for(i=0;i<100;i++) sum=i + nvalue; printf("The sum is:%d",sum); return(0); } }