When my user enters 'E' or 'e' then it asks them for their input as an integer but now the problem is which index in the array should I save it to knowing that my program will continually run.
Code:
int main(void)
{
int array[10];
while ( TRUE )
{
if ( user1 == 'E' || user1 == 'e' )
{
printf ("\nPlease enter an integer number: ");
scanf ("%d", &user2);
if ( user2 >= 0 )
{
array[] = user2;
counterPositive++;
}
else if ( user2 < 0 )
{
array[] = user2;
counterNegative++;
}
}
totalCounter = counterPositive + counterNegative;
}
}
}