While Compilation Its work correct after submit showing test not pass wrong answer. Let me explain where error . thank you

#include
using namespace std;

int main()
{
int car_no;
int n;
cin>>n;
while(n!=0)
{
cin>>car_no;
int sum=0;
while(car_no>0)
{
int rem = car_no%10;
car_no = car_no/10;
sum = sum + rem;
}
if(((sum%2==0)&&(sum%4==0))||((sum%3==0)&&(sum%2!=0)))
{
cout<<“Yes”<<endl;
}
else
{
cout<<“No”;
}
n–;
}

return 0;

}

hi @dheerajjha11111_bb855e8d7a52ef0d,
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

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.