Math program using switch case statement
<p>I'm currently typing up a simple program with methods and a switch case that uses a person's response to add, multiply, subtract or divide by calling the corresponding method depending upon the user's input. </p>

<p>I'm having three problems:</p>

<ol>
<li><p>My switch statement isn't working</p></li>
<li><p>The program is asking me to initialize the variable <code>answer</code>, but when I set it to 0, I always get a response of 0, no matter what the equation is.</p></li>
<li><p>My method isn't returning the answer, but it will show the correct answer when I output from within the method. Here is my code below and my compiling error.</p></li>
</ol>

<hr>

<pre><code>import java.util.Scanner;

public class Math {

    public static void main (String[] args){

        //used to import scanner class for keyboard use
        Scanner kb = new Scanner(System.in);

        //used to hold value of first number
        int a;
        //used to hold the value of the second number
        int b;
        //used to hold value for response of line 29
        int d;

        //out put message to user
        System.out.println("Please enter a whole number between 0 and 100.");
        a = kb.nextInt();

        if (a &gt; 100) {
            System.out.println("The number you entered did not match the criteria, please run the program again.");
            System.exit(0);
        } else
            System.out.println("Please enter another whole number between 0 and 100.");

        b = kb.nextInt();

        if (b &gt; 100) {
            System.out.println("The number you entered did not match the criteria, please run the program again.");
            System.exit(0);
        } else
            System.out.println("What would you like to do with these two numbers?");

        System.out.println("1=Add, 2=Subtraction, 3=Multiply, 4=Divide");

        d = kb.nextInt();

          switch(d){

          case '1':
              System.out.println("you choose addition!");
              add(a, b);
              break;

          case '2':
              subtract(a, b);
              break;

          case '3':
              multiply(a, b);
              break;

          case '4':
              divide(a, b);
              break;

          default:
              System.out.println("You did not make a valid choice, please run the program again.");
              System.exit(0);
          }
    }

    public static int add(int x, int y){
        int answer;
        answer = x+y;
        return answer;
    }

    public static int subtract(int x, int y){
        int answer = x-y;
        return answer;
    }

    public static int multiply(int x, int y){
        int answer = x*y;
        return answer;
    }

    public static int divide(int x, int y){
        int answer = x/y;
        return answer;
    }

}
</code></pre>