Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main() {
- int tab[6] = {1,2,5,8,4,3};
- for (int i=0; i<6; i++) {
- if(tab[i] %2 == 0)
- cout <<tab[i]<<" ";
- }
- cout << endl;
- for (int i=0; i<6; i++) {
- if(tab[i] % 2 == 1)
- cout <<tab[i]<<" ";
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement