1/* Create Switch cases */
2Scanner sc= new Scanner(System.in);
3int firstNum= sc.nextInt();
4int secondNum= sc.nextInt();
5System.out.println("Enter an operator (+, -, *, /):");
6char operator= sc.next().chartAt(0);
7double result=0;
8switch(operator){
9 case "+":
10 result+= firstNum+ secondNum;
11 break;
12 case "-":
13 result+= firstNum-secondNum;
14 break;
15 case "*":
16 result+= firstNum*secondNum;
17 break;
18 case "/":
19 result+= firstNum/secondNum;
20 break;
21}