Minggu, 17 April 2011

program turbo pascal tentang SPL-lengkap

Program SPL_Lengkap;
USES CRT;
VAR
I,J,K,N : INTEGER;
P,JUMLAH : REAL;
A : ARRAY [0..99,0..99] OF REAL;
X : ARRAY [0..99] OF REAL;
BEGIN
CLRSCR;
WRITE ('MASUKKAN UKURAN MATRIKS :'); READLN(N);
FOR I := 1 TO N DO
BEGIN
FOR J := 1 TO N+1 DO
BEGIN
WRITE('A(',I,',',J,') :');READLN(A[I,J]);
END;
END;

{TAHAP I}
FOR K := 1 TO N-1 DO
BEGIN
FOR I := K+1 TO N DO
BEGIN
P:= A[I,K]/A[K,K];
FOR J:= K+1 TO N+1 DO
BEGIN
A[I,J]:= A[I,J]-P*A[K,J];
END;
A[I,K]:=0;
END;
END;

{TAHAP II}
X[N]:=A[N,N+1]/A[N,N];
FOR I:= N-1 DOWNTO 1 DO
BEGIN
JUMLAH :=0;
FOR J:= I+1 TO N DO
BEGIN
JUMLAH := JUMLAH + A[I,J]*X[J];
END;
X[I]:= (A[I,N+1]-JUMLAH)/A[I,I];
END;
WRITELN('NILAI X YANG DICARI');
FOR I:= 1 TO N DO
BEGIN
WRITELN('X(',I,')= ',X[I]:0:2);
END;
READLN;
END.

by: Yul

foto yulfikar dan kawan-kawan kampus di FKIP baru unsyiah

nah,,,,, keren kan????????????

Minggu, 10 April 2011

program just basic

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

Jumat, 08 April 2011

SMA N I Panga

Rekreasi atau acara perpisahan anak SMA N I Panga  leting 2011 yang bertempat di Danou Toba (Medan) yang di kawai(di dampingi) oleh sejumlah guru dari SMA N I Panga tersebut.