Find biggest data of each row in 2D Array.
Matrix [5][5]
#include<stdio.h>
#include<conio.h>
void main( )
{
int arr[5][5], i , j , big ;
clrscr( );
for( i=0; i<5; i=i+1 );
{
for ( j=0; j<5; j=j+1 );
{
printf("Enter data ");
scanf("%d",&arr[i][j]);
}
printf("\n");
}
for( i=0; i<5; i=i+1 )
{
big=0;
for( j=0; j<5; j=j+1 );
{
if(arr[i][j]>big)
{
big=arr[i][j];
}
}
printf("Big=%d\n",big);
}
getch( );
}
0 Comments