Showing Test case not passed

On giving custom input all cases are passing but on submiting code saying test case not passsed.
This is the code -
#include
using namespace std;
int main() {
int n;
cin>>n;
while(n>0){
int car_number , sum =0;
cin>>car_number;
while(car_number>0){
int z = car_number%10;
sum = sum + z;
car_number = car_number/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;}
}
n–;
}

return 0;

}

#include using namespace std; int main() { int n; cin>>n; while(n>0){ int car_number , sum =0; cin>>car_number; while(car_number>0){ int z = car_number%10; sum = sum + z; car_number = car_number/10; } if(sum%2==0 or sum%3==0){ if(sum%4==0){cout<<“Yes”<<endl;} else if(sum%3==0){cout<<“Yes”<<endl;} else {cout<<“No”<<endl;} } else{ cout<<“No”<<endl; } n–; } return 0; }

Showing this also incorrect

@chiragjcj1 share it using cb ide

@chiragjcj1
copy paste here


save and share the link

@chiragjcj1 i think you misunderstood the question here check the corrected code for more understanding

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.