title: Adding constraints to integers
body: <p>I am trying to limit the input number to be greater than 0 and an integer. </p>
  
  <p>Code Here:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class PROB4_CHAL1   // Sum of Numbers
  {
  public static void main(String[] args)
  {
  
   int sum = 0;
   int count = 1;
   int number = 1;
  
   Scanner input = new Scanner(System.in);
  
   System.out.println("Enter an integer " + 
                "greater than 0.");
   number = input.nextInt();
  
   while (number &gt;= count) 
   {
    sum += count;
    count ++;
   }
  
   System.out.println("Sum equals " + sum);
  
  
  }
  }
  </code></pre>
  
  <p>New to Java so anything will help!</p>