fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int tab[5]={7, 4, 1, 0, 0};
  7.  
  8. for (int i=0; i<5; i++)
  9. if (tab[i]%2==0)
  10. cout << tab[i] << endl;
  11.  
  12. for (int i=0; i<5; i++)
  13. if (tab[i]%2==1)
  14. cout << tab[i] << endl;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
4
0
0
7
1