please tell me what the hell mistake i am repeating. i don’t need solution of it. i just want to rectify my mistake.
Sir i am sending this code 3rd time and it still not giving right answer
you have to increase even or odd
not digit
so correct statement will be odd+=digit and even+=digit
one more mistake you have done
digit=no%10;
no=no/10;
if (digit%2==0)
{
digit+=even;
}
else{
digit+=odd;
}
this part you have to do repedeatly so that you get all digits of a no
hence put it inside while loop
thanks for the help sir. i have already put this above mentioned part in while loop. i have closed while loop just before return 0; but it is still giving wrong answer.
it gives the 2nd test case 12143=yes
but according to question 2+4=6 and 6 is not divisible by 4 so the answer should be “No” but it is showing Yes…why it is throwing this error???
have you done all the changes i told you to do??
i have done the changes that i expecting from you
you can check and if not able to understand you can ask
Modified Code
if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved 