title: How to find the number of correct answers that user had made then convert the correct answer to percentage?
body: <p>There are 3 questions for user to answer. For example: if user had made all answers correctly, the code will show that "You got 3 correct answer and your grade is 100%" </p>
  
  <pre><code>    int x = ( int ) (20 * Math.random()) + 1;
      int y = ( int ) (20 * Math.random()) + 1;
  
      System.out.println(x + " + " + y + " : ");
      int sum = keyboard.nextInt();
      if (sum == (x+y)) {
          System.out.println("Correct!");
      }
      else {System.out.println("Wrong!");
      }
  
      System.out.println( x + " * " + y + " : ");
      int mult = keyboard.nextInt();
      if (mult == (x*y)) {
          System.out.println("Correct!");
      }
      else {System.out.println("Wrong!");
  
      }
  
      System.out.println(x + " - " + y + " : ");
      int minus = keyboard.nextInt();
      if (minus == (x-y)) {
          System.out.println("Correct!");
      }
      else {
          System.out.println("Wrong!");
      }
  </code></pre>