0
How can I print the maximum element of the columns of the matrix?
I can print the maximun element of the rows, but I can´t do it with the columns. https://code.sololearn.com/cNjV4pKqAKPM/?ref=app
4 Antworten
+ 2
You're very welcome
0
Let me see your code?
You know how to share code link here? in case not, follow this guide 👇
https://www.sololearn.com/post/75089/?ref=app
0
Jessica
Here is a modified `numMax` method that seeks for maximum value by rows.
public void numMax (int filas, int columnas, int matriz [][])
{
for (int i = 0, mayor; i < columnas ; i++)
{
mayor = 0;
for (int j = 0; j < filas ; j++)
{
if (matriz[j][i] > mayor)
{
mayor = matriz[j][i];
}
}
System.out.println(mayor);
}
}
0
Thank you very much.