title: Find the even sum and even max
body: <p>I am trying to find the even sum and even max from numbers inputted by the user. For example, if they answered "How many integers?" with 4 and inputted the integers: 2, 9, 18, 4 it should output: </p>
  
  <pre><code>how many integers? 4
  next integer? 2
  next integer? 9
  next integer? 18
  next integer? 4
  even sum = 24
  even max = 18
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>    public static void evenSum(){
          //prompt the user to enter the amount of integers
          Scanner console = new Scanner(System.in);
          System.out.print("how many integers? ");
          int numbers = console.nextInt();
          //prompt user to enter the first integer
          System.out.print("next integer? ");
          int firstNum = console.nextInt();
          //set the even max to the firstNum
          int evenMax = firstNum;
          //set the evenSum to zero
          int evenSum = 0;
          //for loop for the number of times to ask user to input numbers
          for (int i = 2; i &lt;= numbers; i++) {
              System.out.print("next integer? ");
              int num = console.nextInt();
              //check to see if the first number is even
              if (firstNum % 2 == 0){
              //if it is even then add it to the evenSum
                  evenSum += firstNum;
              }
              //check to see if the numbers entered are even
              if (num % 2 == 0) {
              //if they are even add them to the evenSum
                  evenSum += num;
              }
              //check to see if the number entered is bigger than the first number
              if (num &gt; firstNum) {
                  if (num % 2 == 0 ) {
                      evenMax = num;
                  }
              }
          }
          System.out.println("even sum = " +evenSum);
          System.out.println("even max = " +evenMax);
  }
  </code></pre>
  
  <p>But here is what is my output is:</p>
  
  <pre><code>how many integers? 4
  next integer? 2
  next integer? 9
  next integer? 18
  next integer? 4
  even sum = 28
  even max = 4
  </code></pre>
  
  <p>Could someone help me figure out what the problem is?</p>