Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C++ defines a plastic two-dimensional array, finds out the maximum value of each row in the array and outputs it. Urgent! ! !
C++ defines a plastic two-dimensional array, finds out the maximum value of each row in the array and outputs it. Urgent! ! !
See if it meets your requirements:

# include & ltiostream & gt

Use namespace std

int array[5][5];

void main()

{

Cout & lt& lt "Please enter a value for the array:"

for(int I = 0; I<5; i++)

{

for(int m = 0; m & lt5; m++)

{

CIN & gt; & gtarray[I][m];

}

Cout & lt& lt "Please enter the value of the next row of the next array:"

}

for(int I = 0; I<5; i++)

{

for(int m = 0; m & lt5; m++)

{

if(array[I][m]& gt; Array [i][m+ 1])

{

Array [I][m+ 1]= array [I] [m];

}

}

The maximum value of this row in cout & lt& lt "array is:"

}

}