Some loop problems

Hey guys,

Im writing a program right now where the user enters integers until a sentinel value is entered. After that, the program displays how many positive and negative numbers there are.

I used a while loop for the user to enter the integers, but I am having difficulty figuring out how to tell the program "count how many positive and negative numbers are in the list"

Can anyone point me in the right direction?
Thank you
closed account (2UD8vCM9)
Have an integer to store # of positive numbers and an integer to store # of negative numbers.

Iterate through your array of integers.

If integer >0 add 1 to integer storing # of positive numbers.
else add 1 to integer storing # of negative numbers.
Topic archived. No new replies allowed.