← Problem book: C
Lesson 52 of 96 · 10 XP
Sum of even numbers
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
The first line contains the count of numbers n (n ≥ 1), the second — the n integers themselves, separated by spaces.
Print the sum of the even numbers among them. If there are no even numbers, print 0.
Example
Input:
5
1 2 3 4 5
Output:
6
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.