Can You help me in this problems of delhi's even odd

To print even digits I have used
int z =1;
sum = sum + (remainder + (-1)^z * remainder)/2;
z = z + 1;
Please correct the code and explain whats fault in this technique

hello @yashratnani6

pls explain what u r doing here.

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.