Beruflich Dokumente
Kultur Dokumente
h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause")
or input loop */
int matriz[3][5] = {11, 12, 13, 14, 15, 21, 22, 23, 24 , 25, 31, 32, 33, 34, 35};
int aux[5][3];
int transposta[5][3];
PreencheMatriz();
printf("\n----------------\n");
Transpor();
return 0;
}
void PreencheMatriz(){
int i, j;
void Transpor()
{
int i, j, k;
for (i = 0; i < 3; i++) {
for (j = 0; j < 5; j++) {
transposta[i][j] = matriz[j][i];
}
printf("\n");
}