I have taken odd sum and even sum separately yet it is showing error. once please check the code and let me know.
#include
using namespace std;
int main() {
int N,no;
cin>>N;
int even_sum=0;
int odd_sum=0;
while(N>0 && N<=1000) {
cin>>no;
if(no>0)
{
int p = no%10;
if(p%2==0) {
even_sum=even_sum+p;
}
else {
odd_sum=odd_sum+p;
}
no=no/10;
}
if(even_sum%4==0 || odd_sum%3==0)
{
cout<<“YES”<<endl;
}
else {
cout<<“NO”<<endl;
}
N=N-1;
}
return 0;
}
What's wrong with my code please let me know
@tarunasree123 corrected the code(commented the mistakes)
dont forget to hit like and mark resolved if cleared 