//Dev-C++ 5.11
#include
using namespace std;
int main(void)
{const int n=6;
int arr[n],c;
for(int i=0;i cin>>arr[i];
for(int i=0;i for(int j=i+1;j if(arr[i]>arr[j] && arr[i]%2==0 && arr[j]%2==0)
{c=arr[i];
arr[i]=arr[j];
arr[j]=c;}
for(int i=0;i for(int j=i+1;j if(arr[i] {c=arr[i];
arr[i]=arr[j];
arr[j]=c;}
cout<<"Array"<<endl;<br> for(int i=0;i cout<<arr[i]<<" ";<br> return 0;}
Пример ввода:
2 6 4 1 5 3
Пример вывода:
Array
2 4 6 5 3 1