cls
rem "spl segitiga atas"
print "ukuran matrik =";: input n
for i = 1 to n
for j = i to n
print "a(";i;",";j;")=";:input a(i,j)
next j
next i
for i = 1 to n
print "c(";i;")=";:input c(i)
next i
x(n)=c(n)/a(n,n)
for i = n-1 to 1 step -1
jumlah=0
for j = i+1 to n
jumlah = jumlah + a(i,j)*x(j)
next
x(i) = (c(i)-jumlah)/a(n,n)
next
print
for i = 1 to n
print "x(";i;")=";x(i);", ";
next
end
Tidak ada komentar:
Posting Komentar