Hey guys,can you please help me out here. Thanks.
Code:
#include<stdio.h>
#include<string.h>
int
main(void)
{
int array[100];
int i,maxi,nvalue;
/*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)
{
maxi = i;
break;
}
maxi=100;
}
printf("\n%d",array);
while(nvalue >maxi)
{
scanf("%d");
printf("Please try again");
/* Lets calculate the sum*/
printf("The sum is:");
return(0);
}
}