Advertisement
Bob103

четные

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