Where is the error in my code it is showing exception

import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int a=0,b=0,c=0;
char ch=0;
do {
a=sc.nextInt();
b=sc.nextInt();
ch=sc.next().charAt(0);
if (ch == ‘+’) {
c = a + b;
System.out.println(c + " ");
} else if (ch == ‘-’) {

                c = a - b;
                System.out.println(c + " ");
            } else if (ch == '*') {
                

                c = a * b;
                System.out.println(c + " ");
            } else if (ch == '/') {
                
                c = a / b;
                System.out.println(c + " ");
            } else if (ch == '%') {
                
                c = a % b;
                System.out.println(c + " ");
            } else if (ch >= 58 && ch <= 64) {
                System.out.println("Invalid operation. Try again.");
            }
        }while(ch!='x' && ch!='X');
        sc.close();
    }
}

We first need to the input a character.
If ch is among ‘+’, ‘-’, ‘*’, ‘/’ or ‘%’ then only we need to take the input a and b.
So take the input a and b inside the if conditions.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.