Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Copyright ITOIT Meditatii SRL
- * Lesson challenge
- */
- #include <iostream>
- using namespace std;
- // Descrieti in limbaj natural ce face programul de mai jos.
- int main()
- {
- int v[20], n, s = 0;
- cin >> n;
- for(int i = 0; i < n; ++i)
- cin >> v[i];
- for(int i = 0; i < n; ++i)
- if(v[i] % 2 == 0)
- s += v[i];
- cout << s;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement