Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <dllBridge.h>
- #include <iostream>
- using namespace std;
- void f_input(int);
- int c3 = 0, // Счётчик троек
- c4 = 0,
- N; // N – количество элементов...
- // ... целочисленного массива (от 1 до 100 вкл.)
- int *arr; // int arr[100];
- ////////////////////////////////////////////////////
- int main() //
- {
- f_input(2);
- N = Transit[1][0];
- arr = &Transit[1][1];
- for(int i = 0; i < N; i++)
- {
- if(arr[i]%2) { cout << arr[i] << " "; c3 ++; }
- } cout << endl;
- for(int i = 0; i < N; i++)
- {
- if(arr[i]%2 == 0) { cout << arr[i] << " "; c4 ++; }
- } cout << endl;
- if(c4 >= c3) cout << "YES";
- else cout << "NO";
- cout << endl;
- system("pause");
- }
- /////////////////////////////////////////////////////
- void f_input(int n) //
- {
- switch(n)
- {
- case 1: Transit[1][0] = 5;
- Transit[1][1] = 4;
- Transit[1][2] = 16;
- Transit[1][3] = 19;
- Transit[1][4] = 31;
- Transit[1][5] = 2;
- break;
- case 2: Transit[1][0] = 8;
- Transit[1][1] = 29;
- Transit[1][2] = 4;
- Transit[1][3] = 7;
- Transit[1][4] = 12;
- Transit[1][5] = 15;
- Transit[1][6] = 17;
- Transit[1][7] = 24;
- Transit[1][8] = 1;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement