Iago Marques Posted October 24, 2019 at 06:08 PM Report Share #616436 Posted October 24, 2019 at 06:08 PM Código abaixo: #include <stdio.h> #include <stdlib.h> #include <math.h> #include <locale.h> #define lin 2 #define col 2 main(){ setlocale(LC_ALL, "Portuguese"); int mat[lin][col], l, c, temp; for(l=0; l<lin; l++){ printf("- Linha [%i]", l); for(c=0; c<col; c++){ printf("\n\t- Coluna [%i]: ", c); scanf("%i", &mat[l][c]); } } for(l=0; l<col; l++){ for(c=l+1; c<col; c++){ if(mat[l][c] > mat[c][l]) temp = mat[l][c]; mat[l][c] = mat[l][c]; mat[c][l] = temp; } } printf("\nMatriz em Ordem Crescente."); for(l=0; l<lin; l++){ printf("\n\n"); for(c=0; c<col; c++){ printf("\t [%i]", mat[l][c]); } } } Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted October 29, 2019 at 11:35 AM Report Share #616473 Posted October 29, 2019 at 11:35 AM - qual é o sentido deste tópico ? - qual o significado de valores da matriz ? - qual o indicador de "crescente" ? IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now