Delhi odd even sum

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

please tell me where I am wrong in this code

Hi @tarshid7… so u have to maintain 2 sum variable one for odd and other for even
refer this https://ide.codingblocks.com/s/588195

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.