Archive

Archive for June, 2009

>SPL Segitiga Bawah

>Berikut adalah source code program menghitung sistem persamaan linier yang berbentuk segitiga bawah, silahkan edit program ini jika ada terjadi kesalahan

cls
input “berapa ukuran matrik= “;n
for j=1 to n
for i=j to n
print “a(“;i;” ,”;j;”) = ” ;: input a(i,j)

next
next
for i=1 to n
print “c(“;i;”)=” ;: input c(i)
next i

x(1)=c(1) / a(1,1)
for i=2 to n
jumlah =0
for j=1 to i-1
jumlah= jumlah + a(i,j)*x(j)
next
x(i)= (c(i)-jumlah)/ a(i,i)
next
‘ini cetakan hasilnya
for i=1 to n
print “x(“;i;”)=” ; x(i);”,”;
next
end

Categories: Quick Basic
Follow

Get every new post delivered to your Inbox.