[javadoc]I'm new to this site and was hoping to find some help as I'm beginning to learn
Java
the problem is: Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values (excluding 0s). Your program ends with the input 0. Display the avg as floating number.
An example run: Enter an int, input ends if it is 0: 1 2 -1 0
Number of positives is 2
Number of negatives is 1
Total is 2
Average is 2/3
What I have so far is:
Whenever I input numbers, it doesn't terminate. And also, I'm not sure how to calculate the average if there is not a definite amount of numbers that will be entered. Any help is much appreciated, thanks