whats the problem. It executes but doesnt show the correct answer. It gets compiled as well. I've used calling function in many places. its assumed that the matrix is square and i give the input througgh terminal. for ex=3 then a random 3x3 matrix but the value seems to be incorrect
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
void row(int r1,int r2,int n,float A[n][n]){
int c;
float temp[n][n];
for(c=0;c<n;c++){
temp[r1][c]=A[r1][c];
A[r1][c]=A[r2][c];
A[r2][c]=temp[r1][c];
}
}
void maximum(int i, int n,float A[n][n]){
int j;
float max=fabs(A[i][i]);
for(j=i+1;j<n;j++){
if(fabs(A[j][i])>max){
max=fabs(A[j][i]);
row(i,j,n,A);
}
}
}
void op(int k, int n,float A[n][n]){
int i,j;
float f;f
for(i=1;i<n-1-k;i++){
f=-(A[k+i][k]/A[k][k]);
for(j=0;j<n-1-k;j++){
A[k+i][k+j]=A[k+i][k+j]+f*(A[k][k+j]);
}
}
}
int main(){
int i,j,n;
printf("Enter the order of the matrix:");
scanf("%d",&n);
float A[n][n];
for(i=0;i<n;i++){
for(j=0;j<n;j++)
scanf("%f",&A[i][j]);
}
float det=1;
for(i=0;i<n-1;i++){
maximum(i,n,A);
op(i,n,A);
det*=A[i][i];
}
det*=A[n-1][n-1];
printf("%f\n",det);
return 0;
}