#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;
}