Tenho uma matriz 3x3, gostaria de exibir os valores em ordem decrescente, ficaria assim: 9 8 7 6 5 4 3 2 1 #include <iostream>
using namespace std;
int main ()
{
int l,c, vetor[3][3]={{1,2,3},{4,5,6},{7,8,9}};
for (l=0;l<3;l++)
{
for (c=0;c<3;c++)
{
cout << vetor[c][l] << "\t";
}
}
cout << "\n\n";
system("pause");
} Para ler as colunas na ordem decrescente, seria necessário alterar o segundo for, iniciando a leitura no último valor e decrementando c até que este chegue a 0. Como ficaria?