Your IP : 216.73.216.40


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

#include<stdio.h>
int highest(int numbers[][15],int n,int m)
{
	int i,j;
	int max=numbers[0][0];
	for(i=0;i<m;i++)
	{
		for(j=0;j<n;j++)
		if(max<=numbers[i][j])
		max=numbers[i][j];
	}
	return max;
}
int main()
{
	int n,m,i,j,y;
	int numbers[15][15];
	printf("enter the no. of rows & columns of the matrix ");
	scanf("%d %d",&m,&n);
	printf("enter the elements of the matrix ");
	for(i=0;i<m;i++)
	{
		for(j=0;j<n;j++)
		scanf("%d",&numbers[i][j]);
	}
	for(i=0;i<m;i++)
	{
		for(j=0;j<n;j++)
		printf("%4d ",numbers[i][j]);
		printf("\n");
	}
	y=highest(numbers,n,m);
	printf("\nhighest no. in the matrix is %d\n",y);
	return 0;
}