Accept a 5*5 Matrix and find maximum number

#include <stdio.h>
#include <conio.h>
void main()
{
 int a[5][5],i,j,max=0;
 clrscr();
 printf("Enter any 5x5 matrix= ");
 for(i=0;i<=4;i++)
  {
   for(j=0;j<=4;j++)
    scanf("%d",&a[i][j]);
   printf("\n");
  }
max=a[0][0];
for(i=0;i<=4;i++)
   for(j=i+1;j<=4;j++)
    if(max<a[i][j])
     max=a[i][j];
printf("Max. value in Matrix is = %d",max);
getch();
}

2 comments:

  1. Thanks For this Article.This is very helpful for me.Students who need more information about this topics, They can checkout Maxlearners for free.

    ReplyDelete
  2. output bhe likh deta: as a Example

    ReplyDelete

Related Post

Array:
String functions:
General (Loops-for/while)
Write a Program to print reverse of a given number Write a Program to print Product of Digits (eg. 212=2*1*2=4) of a given number Write a C++ Program to Convert Binary into Decimal Number