largest number from any 5 row by 5 column matrix
#include <stdio.h>
int main()
{ int max=0, i, j;
int m[5][5]={
1,2,3,4,5,
6,4,3,7,3,
12,3,54,7,5,
7,43,6,32,65,
223,65,4643,75,22
};
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
if(max<m[i][j])
max=m[i][j];
}
}
printf("largest number is %d ", max);
}
Comments
Post a Comment