Advertisement
kuba17ism

Untitled

Oct 21st, 2020
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. int tab[6] = {1,2,5,8,4,3};
  8.  
  9. for (int i=0; i<6; i++) {
  10. if(tab[i] %2 == 0)
  11. cout <<tab[i]<<" ";
  12. }
  13.  
  14. cout << endl;
  15.  
  16.  
  17. for (int i=0; i<6; i++) {
  18. if(tab[i] % 2 == 1)
  19. cout <<tab[i]<<" ";
  20. }
  21.  
  22. cout << endl;
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement