Your IP : 216.73.216.40


Current Path : /var/www/html/venkat/old/
Upload File :
Current File : /var/www/html/venkat/old/itm2015009_4.c

#include<stdio.h>
int highest(int a[100][100],int i,int j)
{
	int c,d,max=a[0][0];
	for(c=0;c<i;c++)
		for(d=0;d<j;d++)
			if ( a[c][d]> max)
				max=a[c][d];
	return max;
} 
int main()
{
	int a[100][100],i,j,nrows,ncols,high;
	printf(" please enter the no. of rows and columns\n");
	scanf("%d %d",&nrows,&ncols);
	for(i=0;i<nrows;i++)
		for(j=0;j<ncols;j++)
			scanf("%d",&a[i][j]);
	high=highest(a[100][100],i,j);
	printf("The highest value in the matrix is %d",high);
}