Your IP : 216.73.216.40


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

#include<stdio.h>
int findmax(int *);
int main()
{	int r,c;
	
	r=( getchar()-'0');
	getchar();
	c=(getchar()-'0');
	int s[c*r];
	int product=c*r;
	int i=0;
	getchar();
	char d;
	while((d=getchar())!='\n' )
	{
		s[i]=(d)-'0';
		i++;
		getchar();
		if (i>=product)
			break;
	}
	s[i]='\0';
	int max;
	max=findmax(s);
	printf("%d",max);
	return 0;
}
int findmax (int s[])
{	int max,i;
	max=s[0];
	i=0;
	while (s[i]!='\0')
	{
		if (s[i]>max)
		{
			max=s[i];
		}
	}
	return max;
}