1) #include using std: cout; using std: endl; #include using std: rand; using std: srand; #include using std: time; void print (int*); int main () { int a[10]; srand (time (0); //Заполняем случайными числами от 1 до 10 for (int i=0; i < 10; i+) { a[i]=rand () % 10+1; } print (a); //Меняем местами int temp; for (int i=0; i <= 10; i+=2) { temp=a[i]; a[i]=a[i+1]; a[i+1]=temp; } print (a); return 0; }void print (int*a) { for (int i=0; i < 10; i+) { cout << a[i] << '; } cout << endl; } 2) #include using std: cout; using std: endl; #include using std: rand; using std: srand; #include using std: time; void print (int*); int main () { int a[10]; srand (time (0); //Заполняем случайными числами от 0 до 10 for (int i=0; i < 10; i+) { a[i]=rand () % 11; } print (a); //Находим индекс максимального элемента int largest=0; for (int i=0; i < 10; i+) { if (a[largest] < a[i]) { largest=i; } } //Меняем местами int temp=a[0]; a[0]=a[largest]; a[largest]=temp; print (a); return 0; }void print (int*a) { for (int i=0; i < 10; i+) { cout << a[i] << '; } cout << endl; }