Beginners C

#include
#include
#define LIMIT 10
void main()
{
int chckdgnl();
float deter();
float a[LIMIT][LIMIT],value;
int i,j,order;
clrscr();
printf("Enter order of determent :");
scanf("%d",&order);
for(i=0;i {
for(j=0;j {
printf("Enter (%d,%d) element of the determent :",i+1,j+1);
scanf("%f",&a[i][j]);
}
}
if(chckdgnl(a,order)==0)
value=0;
else
value=deter(a,order);
printf("Determinent Value :%f",value);
getch();
}
float deter(float a[][LIMIT],int forder)
{
int i,j,k;
float mult;
float deter=1;
for(i=0;i {
for(j=0;j {
mult=a[j][i]/a[i][i];
for(k=0;k {
if(i==j) break;
a[j][k]=a[j][k]-a[i][k]*mult;
}
}
}
for(i=0;i {
deter=deter*a[i][i];
}
return(deter);
}
int chckdgnl(float array[][LIMIT],int forder)
{
int i,j,k;
float nonzero;
for(i=0;i {
if(array[i][i]==0)
{
for(j=0;j {
if(array[i][j]!=0)
{
k=j;
break;
}
if(j==(forder)) //forder-1
return(0);
}
for(j=0;j {
array[j][i]=array[j][i]-array[j][k];
}
}
}
return(1);
}