#include
#include
using namespace std;
int main()
{
setlocale(LC_CTYPE, "Rus");
srand(time(0));
int n,min=RAND_MAX,nl=0, j = 0;
cout << "Размер массива: "; cin >> n;
int *a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = rand() % 10;
cout
if ((a[i] < min)&&((i+1)%2!=0)) min = a[i];
}
for (int i = 0; i < n; i++) if (a[i] == min) nl++;
cout
while (j < n-nl)
if (a[j] == min)
for (int i = j; i < n - 1; i++) swap(a[i], a[i + 1]);
else j++;
for (int i = 0; i < n - nl; i++) cout
cout
system("pause");
return 0;
}