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;
}