include stdio include windows define 10 int main int matrix int temp i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>
#include <windows.h>
#define Q 10
int main(){
int matrix[3][3] = {{1,2,3},
{4,5,6},
{7,8,9}};
int temp, index_max_el;
for(int i=0; i < 3; ++i){
index_max_el = 0;
for(int j = 1; j < 3; ++j){
if( matrix[i][index_max_el] < matrix[i][j] )
index_max_el = j;
}
temp = matrix[i][0];
matrix[i][0] = matrix[j][index_max_el];
matrix[i][index_max_el] = matrix[i][0];
}
return 0;
}