| Current Path : /var/www/html/venkat/old/ |
| Current File : /var/www/html/venkat/old/lit2015049_1.c |
#include<stdio.h>
int highest(int *a,int *s);
int main()
{
int n,m,i,j,s;
printf("\n Enter t he number of rows and number of coloum : ");
scanf("%d%d",&n,&m);
int a[n][m];
printf("\n Enter the element of the matrix : \n");
for (i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("\n entered matrix is : - \n");
for (i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
printf("%d \t",a[i][j]);
}
printf("\n");
}
s=n+m;
printf("the higest number is :- %d",highest(&a[0][0],&s));
}
int highest(int *a,int *s)
{
int temp,i,*p;
*p=*a;
temp=*p;
for(i=0;i<*s;i++)
{
if (temp<=*p)
{
temp=*p;
}
p++;
}
return(temp);