title: Write a program that reads an unspecified number of integers
body: <p>"Count positive and negative numbers and compute the average of numbers) 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  (not counting zeros). Your program  ends with the input 0. Display the average as a floating-point number."</p>
  
  <p>I don't know what I did wrong</p>
  
  <pre><code>import java.util.Scanner;
  
  public class NewClass {
      public static void main(String[] args) {
          Scanner input = new Scanner(System.in);
  
          int positive = 0, negative = 0, total = 0, count = 0;
  
          double average;
  
          System.out.println("Enter the number: ");
          int number;
  
          while ((number = input.nextInt()) != 0) {
              total += number;
              count++;
              if (number &gt; 0) {
                  positive++;
              } else if (number &lt; 0) {
                  negative++;
              }
          }
          average = total / count;
          System.out.println("The number of positives is " + positive);
          System.out.println("The number of negatives is " + negative);
          System.out.println("The total is " + total);
          System.out.printf("The average is %d ", average);
      }
  }
  </code></pre>