import javax.swing.*; public class Sequence{ public static void main (String args[]){ String inputInteger; int inputInt; int correct = 0; int incorrect = 0; int total; for(int tries = 0; tries < 10; tries++){ inputInt = Integer.parseInt(JOptionPane.showInputDialog("Enter an even integer")); System.out.println("the user has inputted " + tries + " times"); if(inputInt % 2 == 0){ correct++; }else{ incorrect++; } } System.out.println("The user has " + correct + " correct answers and " + incorrect + "incorrect answers"); result = correct - incorrect; percentage = correct/tries System.out.println("The user has a total of " + result + " points, with a total of " + percentage + " percent."); } }