#include <stdio.h>
#include <stdlib.h>
int main()
{
int y,z;
printf("===============***********===============\n\n");
printf("Program Untuk Membuat Matrik Transpose\n\n");
printf("===============***********===============\n\n");
int awal[5][5]={1,2,4,6,7,
4,5,6,8,1,
7,8,9,0,3,
1,2,5,0,8,
4,5,6,7,8};
printf("Matrik awal\n\n");
for(y=0;y<5;y++){
for(z=0;z<5;z++)
printf(" %d",awal[y][z]);
printf("\n\n");
}
printf("\n\n");
printf("Matriks Transposnya :\n\n");
int b[5][5];
for(y=0;y<5;y++){
for(z=0;z<5;z++){
b[y][z] = awal[z][y];
printf(" %d",b[y][z]); //Output
printf(" ");
}
printf("\n\n");
}
printf("\n");
system("pause");
return 0;
}
0 komentar:
Posting Komentar