Advertisement
askarulytarlan

Задача №64. Вывести четные элементы

Oct 24th, 2016
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4. #include <math.h>
  5.  
  6.  
  7. using namespace std;
  8.  
  9. int massive[100];
  10. int d;
  11. int main(int argc, const char * argv[]) {
  12. cin >> d;
  13. for(int i = 1; i <= d; i++){
  14. cin >> massive[i];
  15. }
  16. for(int i = 1; i <= d; i++){
  17. if(massive[i] % 2 == 0){
  18. cout << massive[i] << " ";
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement