- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
void perestanovka(int a[13][13], int n, int m){
int maxim, minim, temp,i;
for (i=0; i<n; i++){
minim=0;
for (int j=1; j<m; j++){
if(a[i][j]<a[i][minim]) minim=j;
}
temp=a[i][0];
a[i][0]=a[i][minim];
a[i][minim]=temp;}
for (int j=0; i<n; i++){
maxim=0;
for (int j=1; j<m; j++){
if(a[i][j]>a[i][maxim]) maxim=j;
}
temp=a[i][m-1];
a[i][m-1]=a[i][maxim];
a[i][maxim]=temp; }
}