Odd even problem

question is
Due to an immense rise in Pollution, Kejriwal is back with the Odd and Even Rule in Delhi. The scheme is as follows, each car will be allowed to run on Sunday if the sum of digits which are even is divisible by 4 or sum of digits which are odd in that number is divisible by 3. However to check every car for the above criteria can’t be done by the Delhi Police. You need to help Delhi Police by finding out if a car numbered N will be allowed to run on Sunday?

my code:

#include
using namespace std;
int main(){
int n;
int ans=0;

cin>>n;
for(int i=1;i<=n;i++){
 int number;
	cin>>number;
	while(number>0){
		int n=number%10;
		number=number/10;
		ans=ans+n;
	}
	if(ans%2==0 and ans%4==0){
		cout<<"Yes"<<endl;
	}
	else if(ans%2==0 and ans%4!=0){
		cout<<"No"<<endl;
	}
	else if(ans%2!=0 and ans%3==0){
		cout<<"Yes"<<endl;
	}
	else if(ans%2!=0 and ans%3!=0){
		cout<<"No"<<endl;
	}

	}
	return 0;

}

please tell me my mistake?