j
is never less than 1, so the loop won't exit.
j
is only incremented:
j++
.
Ask yourself, "How does the user tell me they are finished?".
Rather than calculate as you go, it would be better to do that after the user has completed entering their number.
[Edit:] Here is pseudo code to do what you want:
do
{
/* 1. get user input
* 2. test input:
* if {exit loop marker} then break
* if {invalid value} then warn
* else add value to array
*/
}
for {start; test max; increment}
{
/* if isPositive, inc positive count
* if isNegative, inc negative count
* else inc zero count
*/
}
// report counts back to user
This should be enough of a guide to help you write your code.
TIP: use variable names that represent what the values hold. Make code 1000% more readable.