menjumlahkan dua matrik 2 x 3

‘program menjumlahkan dua matriks’

cls

print “ini matriks A”

for i= 1 to 2

for j= 1 to 3

print “A[“;i;”,”;j;”] =”; :input A(i,j)

next j

next i

print “ini matriks B”

for i= 1 to 2

for j= 1 to 3

print “B[“;i;”,”;j;”] =”; :input B(i,j)

next j

next i

for i= 1 to 2

for j= 1 to 2

C(i,j)=A(i,j)+B(i,j)

next j

next i

print ” ini jumlah matriks C”

for i= 1 to 2

for j= 1 to 2

print “C[“;i;”,”;j;”] =”; :print C(i,j)

next j

next i

END

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s