I agree that the sum is different. I said so before. All I say is that the result of what we're interested in, in this case, remains the same - just because the ASCII value of '0' modulo 2 is 0.
We're not interested in the sum of the digits. We're interested to know if the number's sum of digits is even or odd, or in other words: if it's 0 (modulo 2) or 1 (modulo 2) respectively.
Last edited by unbeatable0; Apr 10th, 2009 at 2:17 pm.
Guys instead of USING AN ARPHODOX method to solve your conversion from char to numerical. Why dont you use the atoi() function built in. That way you will not need to care abt any format.
Guys instead of USING AN ARPHODOX method to solve your conversion from char to numerical. Why dont you use the atoi() function built in. That way you will not need to care abt any format.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.