Why test cases not passing?

#include
using namespace std;
int main() {
int N;
cin>>N;

int s=0;

while(N>0){
    	int f;
cin>>f;

while(f>0){
int r=f%10;
s=s+r;
f=f/10;

}

if(s%2==0 and s%4==0){
cout<<“Yes”<<endl;

}
else if(s%2==0 and s%4!=0){
    cout<<"No"<<endl;
}

else if(s%2!=0 and s%3==0){
cout<<“Yes”<<endl;

}
else if(s%2!=0 and s%3!=0){
    cout<<"No"<<endl;
}

else{
cout<<“No”;
}
N–;
}
return 0;
}

refer this https://ide.codingblocks.com/s/591165

This question from programming fundamental. So we can,t use array.Please rectify mistake in my code

I have removed array from the soln… https://ide.codingblocks.com/s/591165
kindly refer it as ur logic is not right

Thanks issue resolved

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.