#A matrix of size N×M is given. Sort its rows in descending ordertheir maximum elements.
1 messages · Page 1 of 1 (latest)
Hello @rancid marlin, can you please provide more details?
I don’t need it anymore, my friend helped me
1 messages · Page 1 of 1 (latest)
example made by the teacher:
for (i = 0; i < n; i++)
{
b[i] = c[i][0];
for (j = 1; j < m; j++)
if (c[i][j] > b[i]) b[i] = c[i][j];
}
for (i = 0; i < n - 1; i++)
for (j = i + 1; j < m; j++)
if (b[i] > b[j])
{
t = b[i];
b[i] = b[j];
b[j] = t;
for (k = 0; k < m; k++)
{
t = c[i][k];
c[i][k] = c[j][k];
c[j][k] = t;
}
}
Hello @rancid marlin, can you please provide more details?
I don’t need it anymore, my friend helped me