Delhi's odd even challenge

custom input is working but test cases are not passing

please check my code

#include
using namespace std;
bool oddeven(int n){
long long int y=0;
while(n!=0){
int digit=n%10;
y+=digit;
n/=10;
}
if(y%2!=0){
return (y%3)?false:true;
}
else if(y%2==0){
return (y%4)?false:true;
}

}

int main() {
int a;
cin>>a;
while(a–){
long long int n;
cin>>n;
if(oddeven(n)){
cout<<“yes”<<endl;
}
else{
cout<<“no”<<endl;
}
}
return 0;
}

https://online.codingblocks.com/app/player/45121/content/19258/4700

@sk3657860 hey sonu kumar
the logic of this problem
For ex if you are given a no.:

982452

then maintain 2 variables evesum=0, oddsum = 0 ;
and they will be:

9 + 8 + 2 + 4 + 5 + 2
evesum = 8 + 2 + 4 + 2 = 16
oddsum = 9 + 5 = 14
if((evesum%4==0)||(oddsum%3==0)){
cout<<“Yes”<<endl;
}else{
cout<<“No”<<endl;
}