Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int n ,i,a ,s;
  5. int main()
  6. {
  7. cin>>n;
  8. for (i=1 ;i<=n;i++)
  9. {
  10. cin>>a;
  11. if(a%2==0)
  12. {
  13. s=s+a ;
  14. }
  15. }
  16.  
  17. cout<<s;
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement