Delhi odds even

You logic is going wrong. Do a dry run and check it yourself.
What actually you are doing is that you are finding the sum of all digits and then checking its divisibility with 4 and 3 which is wrong. You have to find the sum of all digits which are even and the sum of all digits which are odd separately. If the sum of all even digits is divisible by 4 or sum of all odd digits is divisible by 3, then only print “Yes”. In all other cases print “No”.

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.

hello @LPU11910344 what doubt do you have now ?

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.