+ 1

CodeCoach That's Odd Java Code Review

I'd appreciate if you could check my code. For all lists of integers I've input, my code is working, but I am failing two of the hidden test cases. Can you see what's missing? For this assignment, a list of integers is input. All odd numbers are disregarded and even numbers should be added. Sample input: 1 4 6 3 Sample Output: 10 Thanks in advance! https://code.sololearn.com/cxJcRI1m2Lix/?ref=app

15th Jan 2020, 8:08 AM
Melissa N
Melissa N - avatar
4 Réponses
+ 3
Input Format: The first input denotes the length of the list (N). The next N lines contain the list elements as integers.
15th Jan 2020, 8:35 AM
Mihai Apostol
Mihai Apostol - avatar
+ 2
Oh, man, I feel really dumb haha. Thank you both!
15th Jan 2020, 8:37 AM
Melissa N
Melissa N - avatar