Wednesday, September 24, 2008

To find saddle point in a triangle with c programming

Program
#include
#include
void main()
{
int a[5][5],i,j,min,max,m,n,flag=1,p,q;
printf("Enter size of the matrix");
scanf("%d%d",&m,&n);
printf("\nEnter the elements of the matrix");
for(i=0;ia[i][j])
min=a[i][j];
p=i;
q=j;
}
}
for(j=0;ja[p][q])
flag=0;
}
if(flag)
printf("Saddle point %d",a[p][q]);
else
printf("no saddle point");
flag=1;
getch();
}

No comments:

Post a Comment

Thanks to given comments.......

My Blog List