Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab6 task 118

Snippet info

Language

Cpp

Visibility

public

Author

niktyutenko

Created

2018-11-17T10:01:42Z

Updated

2018-11-17T10:02:29Z

#include <iostream>
using namespace std;
 
int main()
{
    const int n = 6;
    int b[n];
    int i;
    cout << "Введите элементы: " << endl;
    for (i = 0; i<n; i++) cin >> b[i];
    for (i = 0; i <= n - 1; i++)
    {
            if (b[i] % 2 != 0) cout << b[i] << ' ';
    }
    for (i = 0; i <= n - 1; i++)
    {
        if (b[i] % 2 == 0) cout << b[i] << ' ';
    }
    return 0;
}
INFO