Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int b, a[31], c[40], d[40];
- ///////////////////////////////
- int main() //
- {
- cin >> b;
- for(int i = 0; i < b; i++) cin >> a[i];
- for(int i = 0; i < 31; i++)
- if(a[i] % 2 == 0) c[i] = a[i];
- for(int i = 0; i < 31; i++)
- if(a[i] % 2 != 0) d[i] = a[i];
- for(int i = 0; i < 10; i++) if(c[i] != 0)
- cout << "Чётные" << c[i] << endl;
- for(int i = 0; i < 10; i++) if(d[i] != 0)
- cout << "Не чётные" << d[i] << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement