/* perkalian matriks */
#include
#define nilai_i 2
#define nilai_j 3
#define nilai_k 2
main()
{
int i,j,k;
int matrik_A[3][3],
matrik_B[3][3],
matrik_C[3][3],
clrscr();
printf("Jumlah Baris dan Kolom matrik\n");
printf("Matriks A : [2,3]\n");
printf("Matriks B : [3,2]\n");
printf("\n");
printf("Input Nilai Matrik A\n");
for(i=0;i
scanf("%d",&matrik_A[i][j]); }
}
printf("\n");
printf("Input Nilai Matrik B\n");
for(j=0;j
scanf("%d",&matrik_B[j][k]); }
}
printf("\n");
for(i=0;i
for(k=0;k
matrik_C[i][k] = 0;
for(j=0;j
}
}
printf("Nilai Matrik C = A x B adalah \n");
for(i=0;i
for(k=0;k
printf("\n");
}
printf("\n");
getch();
}
Rabu, 26 Mei 2010
perkalian dua matiks
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar