Sum of Odd Elements Problem

Sum of Odd Elements Problem — ExecCode School DSA Practice

Solve the Sum of Odd Elements problem on ExecCode. Free online school DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given a list of whole numbers. Your task is to solve Sum of Odd Elements. Add only the odd numbers and print that sum.

Examples

Input 5 1 2 3 4 5; Output 9. Input 3 2 4 6; Output 0

Constraints

1 <= N <= 10^4

Practice Sum of Odd Elements free on ExecCode. Browse DSA problems, topic map, and placement guides.