What is wrong in the code?

import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String args[]) {
//Scanner sc = new Scanner(System.in);
do{
char ch = sc.next().charAt(0);

	switch(ch){
		case '+':
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = a+b;
		System.out.println(c);
		break;
		case '-':
		int d = sc.nextInt();
		int e = sc.nextInt();
		int f = d-e;
		System.out.println(f);
		break;
		case '*':
		int g = sc.nextInt();
		int h = sc.nextInt();
		int i = g*h;
		System.out.println(i);
		break;
		case '/':
		int j = sc.nextInt();
		int k = sc.nextInt();
		int l = j/k;
		System.out.println(l);
		break;
		case '%':
		int m = sc.nextInt();
		int n = sc.nextInt();
		int o = m%n;
		System.out.println(o);
		break;
	    default:
		System.out.println("Invalid Operation.Try again");}}
		while(ch!='x'&& ch!='X');





	}
    
}

it is giving me this output

@mishikasrvastava,
https://ide.codingblocks.com/s/326824 corrected code.

Instead of using default, use the if-else condition

my default statement is running twice since the condition is checked after running the loop

@mishikasrvastava,
Don’t use the default condition. Use switch only when ch == β€˜+’ || ch == β€˜-’ || ch == β€˜*’ || ch == β€˜/’ || ch == β€˜%’