title: Count Positive and negative numbers
body: <pre><code>public class Exercise_442 {
  
  /**
   * @param args the command line arguments
   */
  public static void main(String[] args) {
  
      int count=0;
      int positive=0;
      int negative =0;
      int nums=0;
      int sum=0;
  
      Scanner keyboard = new Scanner(System.in);
      System.out.println("Pleaes enter a positive or negative integer");
      nums = keyboard.nextInt();
  
  
      while(nums!=0){
          sum+=nums;
          System.out.println("Plese enter a positive or negative integer");
          nums = keyboard.nextInt();
  
          if(nums&lt;0)
              negative++;
  
           if (nums&gt;0)
              positive++;
  
      }
      System.out.println("The sum of these numbers is " +sum);
       System.out.println("The amount of negative numbers here is " + negative);
        System.out.println("The amount of positive numbers here is " + positive);
      }
    }
  </code></pre>
  
  <p>I need to count the positive and negative numbers here when I enter them. It displays these when the user inputs 0. It counts the negative numbers ok and gets the sum but I don't know why it falls short of one number when it counts the positive integers?</p>