On compilation it works but when submit it shows erroe

#include
using namespace std;

void oddEven(int cN){
int sumOfDigit = 0, r=0;
while(cN>0){
r=cN%10;
cN=cN/10;
sumOfDigit = sumOfDigit+r;
}

if(sumOfDigit%2==0){
    if(sumOfDigit%4==0)
	   cout<<"Yes"<<endl;
	else
	    cout<<"No"<<endl;   
}
else{
	if(sumOfDigit%3==0)
	  cout<<"Yes"<<endl;
	 else 
	   cout<<"No"<<endl; 
}

}
int main() {
int num;
cin>>num;
int N;
for(int i=0;i<num;i++){
cin>>N;
oddEven(N);
}
return 0;
}

hi @pushkarsingh5247_4b1a78f1d102c737,
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.