Delhi s odd or even

code seems to be correct but is tested as wrong for test case can i get help regarding this

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scan =new Scanner(System.in);

	int n=scan.nextInt();
	
	for(int i=1;i<=n;i++)
	{
	
	int x=0;
	
	int carno=scan.nextInt();
	while(carno%10!=0&&carno>=0&&carno<=1000000000)
	{
		
		x=x+carno%10;
		
		carno=carno/10;
		
	}
	
	if(x%2==0&&x%4==0)
	{
		System.out.println("Yes");
	}
	else if(x%2!=0&&x%3==0)
	{
		System.out.println("Yes");
	}
	else
	{
		System.out.println("No");
	}
	
	
	
	}
}

}

You are taking the sum of all digits of the number and then checking the even and odd conditions for the sum. But that is not what the question says. You have to take the sum of all even digits in the number and check if that is divisible by 4 and similarly you have to take sum of all odd digits of the number and check if that sum if divisible by 3. If any one of these conditions is satisfied, then return true.

For example if number is 12345
sum of even digits = 2+4 = 6 (Not divisible by 4)
sum of odd digits = 1+3+5 = 9 (Divisible by 3)

Hence it returns true.