i am getting 1 test case failed but i am unable to figure problem in code
DELHI'S ODD EVEN doubt
hi prateek can you please share your code by saving it on the online ide
hi you have considered any case of sumodd(sum of numbers which are at even places) neither sumeven(sum of numbers at odd places)
the algorithm says
Take input of the Number.
Declare two variables to store the sum of even numbers and odd numbers.
Extract digit one by one ( by % 10).
Check if the number is even or odd.
If even add the number in the variable storing even sum.
Othewise add it in the variable storing odd sum.
After the loop, Check if the even sum is divisible by 4.
If True, print Yes.
otherwise print No.
Check if the odd sum is divisible by 3.
If True, print Yes.
otherwise print No.
check your code against this input
4
32345
44444
33336
00001
expected output:
No
Yes
Yes
Yes
your output:
No
Yes
No
No