Can you please tell the error in my code

package questions;

import java.util.Scanner;

public class delhiOddEven {

public static void main(String[] args) {
	// TODO Auto-generated method stub
	Scanner sc=new Scanner(System.in);
	int n=sc.nextInt();
	while(n>0) {
	String str=sc.nextLine();
	int evensum=0;
	int oddsum=0;
	for(int i=0;i<str.length();i++) {
		if(str.charAt(i)%2==0) {
			evensum=evensum+str.charAt(i);
		}
		else {
			oddsum=oddsum+str.charAt(i);
		}
	}
	if(evensum%4==0 || oddsum%3==0) {
		System.out.println("yes");
	}
	else {
		System.out.println("no");
	}
	}
}

}

Hi @vaibhavvishal98,
You need to convert ascii character to integer to add in evenSum and odd sum and also you need to use next() instead of nextLine() .
Please check the comments in the following code

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.