Advertisement
SergeyPGUTI

5.2.2

Oct 3rd, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int n;
  9.     int A[100];
  10.     cin>>n;
  11.     for (int i=0;i<n;i++)
  12.     {
  13.         cin>>A[i];
  14.     }
  15.     for (int i=0;i<n;i++)
  16.     {
  17.         if (A[i]%2==0)
  18.             cout<<A[i]<<" ";
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement