How come my code is wrong?

#include
using namespace std;
void sunday(int n){
int sum=0;
while(n>0){
int lastdigit=n%10;
sum+=lastdigit;
n/=10;
}

if(sum%2==0){
	if(sum%4==0) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
}

else{
	if(sum%3==0) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
}

}

int main() {

int N;
cin>>N;

int a;

for(int i=0;i<N;i++){
	cin>>a;
	sunday(a);
}


return 0;

}

hi @anshul3558_e8c9aa486c392ca3,
u need to find the sum of even digits in the no (say SUM1) and sum of odd digits in the no (say SUM2)
then if SUM1 is div by 4 or SUM2 is div by 3 you can print yes

eg : 1235
SUM1 = 2; --> not div by 4 (failed)
SUM2 = 1 + 3 + 5 --> 9 --> div by 3 (passed)

any one passes print yes

u can refer the the code if having difficulties in implementation https://ide.codingblocks.com/s/657615