Tugas Metrik 2x3 3x3 Beserta Flowchart dan Coding

Tugas Metrik 2x3 3x3 Beserta Flowchart dan Coding dengan ketentuan soal sebagai berikut.

A.      DESKRIPSI
1.       Tampilkan judul “PERHITUNGAN METRIX (2,3) x (3,2)”
2.       Inptukan nilai metrix A (2,3)
3.       Inptukan nilai metrix B (3,2)
4.       Proses perkalian metrik A (2,3) x metrik (3,2)= metrik (2,2)
5.       tampikan nilai metrix A (2,3)
6.       Tampilkan nilai metrix A (3,2)
7.       Tampilkan hasil perkalian meterix (2,2)

B.      FLOWCHART
start
b=0 ; b<2 b="" o:p="">
k=0 ; k<3 k="" o:p="">
Input metrix A (b,k)
b=0 ; b<3 b="" o:p="">
k=0 ; k<2 k="" o:p="">
Input metrix A (b,k)
b=0 ; b<2 b="" o:p="">
k=0 ; k<2 k="" o:p="">
A
1
2
 
z=0 ; z<3 o:p="" z="">
mbC [b,k]=0
mbC [b,k] = mbC[b,k] + mbA [b,z] x mbB [z,k]
Tampilkan metrix A (2,3)
Tampilkan metrix B (3,2)
Tampilkan hasil metrix perkalialian A (2,2)
End
A
1
2
 
 







C.      PASWDOCODE
1.       Judul PERHITUNGAN METRIX (2,3) x (3,2)”
2.       Narasi input metrix A (2,3) Metrix B (3,2) type data int [,] mbA= new int [2,3] , int [,] mbB= new int [3,2]
Output metrix C (2,2) type data int [,] mbC= new int [2,2]
3.       Kamus
Int = matrix A, matrix B, matrix C
4.       Algoritma
// mulai
// Deklarasi variabel b,k,z, mbA, mbB, mbC
//Masukkan matrix A[baris, kolom] metrix B [baris, kolom]
// proses
        // deklarasi
                        Int [,] mbA = new int [2,3]
                        Int [,] mbB = new int [3,2]
                        Int [,] mbC = new int [2,2]
// input metrix A
        For (int b=0; b<2 b="" o:p="">
        {
                        For (int k=0; k<3 k="" o:p="">
                        {
                        “ Masukkan kordinat A [{0},{1}]=’,b,k”
                        }
        }
// input metrix B
        For (int b=0; b<3 b="" o:p="">
        {
                        For (int k=0; k<2 k="" o:p="">
                        {
                        “ Masukkan kordinat B [{0},{1}]=’,b,k”
                        }
        }

// proses metrix A*B/C
        For (int b=0; b<2 b="" o:p="">
        {
                        For (int k=0; k<2 k="" o:p="">
                        {
                                        mbC [b,k]=0
                                        For (int z=0; z<4 o:p="" z="">
                                        {
                                        mbC [b,k]= mbC [b,k] + mbA [k,z] * mbB [z,k]    
                                        }
                        }
        }
// output metrix A
        For (int b=0; b<2 b="" o:p="">
        {
                        For (int k=0; k<3 k="" o:p="">
                        {
                        “ Tampilkan kordinat A [{0},{1}]=’,b,k”
                        }
        }
// output metrix B
        For (int b=0; b<3 b="" o:p="">
        {
                        For (int k=0; k<2 k="" o:p="">
                        {
                        “ Tampilkan kordinat B [{0},{1}]=’,b,k”
                        }
        }
// output metrix C
        For (int b=0; b<2 b="" o:p="">
        {
                        For (int k=0; k<2 k="" o:p="">
                        {
                        “ Tampilkan kordinat C [{0},{1}]=’,b,k”
                        }
        }
// selesai
Previous
Next Post »