Advertisement
Polnochniy

Untitled

Nov 8th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. const int N = 5;
  5. int main()
  6. {
  7. setlocale(LC_ALL, "Rus");
  8. int a[N];
  9. cout << "Введите элементы массива " << endl;
  10. for (int i = 0; i < N; i++)
  11. {
  12. cin >> a[i];
  13. }
  14. for (int i = 0; i < N; i++)
  15. {
  16. if (a[i] % 2 == 0)
  17. {
  18. cout << "Номер индекса " << i << " ";
  19. cout << "А сам элементы " << a[i] << " " << endl;
  20. }
  21. }
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement