#include #include #define dim 100 void readMatrix(float mat[][dim],int row,int col); float medianum(float mat[][dim],int fix_row,int col); void sortRow(float mat[][dim],int fix_row,int col); void sortMat(float mat[][dim],int fix_col,int row,int col); void swap(float* a,float* b); int main(int argv, char *argc[]) { FILE *fpin,*fpout; int r,c; int fix_col; float mat[dim][dim]; float media[dim]; //Apro il file input.txt fpin=fopen("input.txt","r"); if(fpin!=NULL) { fscanf(fpin,"%d",&r); fscanf(fpin,"%d\n\n",&c); for(int i=0;i0 && scambio==1) { scambio=0; for(int i=0;i(mat[fix_row][i+1])) { swap(&mat[fix_row][i],&mat[fix_row][i+1]); scambio=1; } k--; } } void sortMat(float mat[][dim],int fix_col,int row,int col) { int k=row-1,scambio=1; while(k>0 && scambio==1) { scambio=0; for(int i=0;i(mat[i+1][fix_col])) { scambio=1; for(int j=0;j