Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/venkat/old/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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);
}
	

ZeroDay Forums Mini