Where is problem in my code?

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int rem;
int o=0;
int e=0;
while(n!=0){
int a=sc.nextInt();
while(a!=0){
rem=a%10;
if(rem%2==0){
e=e+rem;
}else{
o=o+rem;
}
a=a/10;
}
if(e%4==0 || o%3==0){
System.out.println(“Yes”);
}else {
System.out.println(“No”);
}
n=n-1;

	}
}

}

hi @Amre-8800
you need to initialize every time you get the input number

while(n!=0){
int a=sc.nextInt();
o=0;
e=0;
rem=0;
while(a!=0){

make the following changes and your code is good to go:blush::blush::blush: