My code is not passing all the test cases.
#include
using namespace std ;
int main()
{
int n,no,sum=0,d;
cin>>n;
while(n!=0)
{
cin>>no;
while(no!=0)
{
d=no%10;
no/=10;
sum+=d;
}
if( (sum%2==0 && sum%4==0) )
{
cout<<"Yes"<<endl;
}
else if( (sum%2==1 && sum%3==0) )
{
cout<<“Yes”<<endl;
}
else
{
cout<<"No"<<endl;
}
n--;
}
return 0;
}