Can’t understand why I’m getting wrong answer
Delhi's odd even wrong answer
You are taking the sum of all digits of the number and then checking the even and odd conditions for the sum. But that is not what the question says. You have to take the sum of all even digits in the number and check if that is divisible by 4 and similarly you have to take sum of all odd digits of the number and check if that sum if divisible by 3. If any one of these conditions is satisfied, then return true.
For example if number is 12345
sum of even digits = 2+4 = 6 (Not divisible by 4)
sum of odd digits = 1+3+5 = 9 (Divisible by 3)
Hence it returns true.