import java.util.Scanner; public class DecisionStatements_Pongasi_Jacklord_10_Graviton { public static void main(String[] args) { Scanner s = new Scanner(System.in); int sum = 0, answer = 2, runner = 0; System.out.print("Please input a positive integer: "); int num = s.nextInt(); if (num > 0) { if (num % 2 == 1) num -= 1; System.out.print("\nEven number(s): "); for (int num2 = num/2; runner < num2; runner++) { if (runner == num2 - 1) { System.out.print(answer); sum += answer; answer += 2; } else { System.out.print(answer + ", "); sum += answer; answer += 2; } } System.out.print("\nSum of even numbers: " + sum); } else System.out.print("\nInvalid Input!!!"); } }