Home > Back-end >  C language programming
C language programming

Time:10-31

Input from the keyboard five rows five columns 2 d integer array data, calculate the maximum of the two-dimensional each row in the array, and the maximum order in a one dimensional array length is 5,

CodePudding user response:

Int main ()
{

Int a [5] [5].
Int b [5];
int max;
For (int I=0; i <5; I++)
{
for (int j=0; J & lt; 5; J++)
{
The scanf (" % d ", & amp; A [I] [j]);
}
}
for (int i=0; i <5; I++)
{
Max=a, [I] [0].
For (int j=1; J & lt; 5; J++)
{
If (Max & lt; A [I] [j])
Max=a, [I] [j].
}
B [I]=Max;
}
for (int i=0; i <5; I++)
{
Printf (" % d, b [I]);
printf("\n");

}

return 0;
  • Related