Rabu, 01 Desember 2010
MY LOVE
Mungkin aku tak pernah punyai lelah
Saat ku terdiam menangisi pergimu
Terus ku terpaku oleh harapan semu
Sepertinya… t’lah cukup banyak kutulis
T’lah cukup dalam hati ini kuiris
Agar bisa kucoba lagi cinta dari mula
Dengan ia yang mampu merasakannya
Namun cinta untukmu terus bertahan
Di sekeping sisa hati ini pun cinta untukmu kurasakan
Kerinduan hadirmu tak pernah bisa hilang
Oh Tuhan… bagaimana semua ini harus kuartikan ?
BY SANTHI
TO SAYANKQ
Sabtu, 01 Mei 2010
Tugas Akhir Modul 6
program nota_belanja;
uses wincrt;
type nota = record
kode : string;
nama_barang : string;
harga : real;
banyak : byte;
end;
var belanja : array[1..20] of nota;
kata,grs : string;
x,y,i,j : byte;
jum_harga,total_harga : real;
begin
clrscr;
grs := '========================================================================';
kata := 'Nota Belanja Barang Toko ABADI Jl.Riwa-riwi No.123 Surabaya';
x := round ((78-length(kata))/2);
gotoxy(x,2);writeln(kata);
x := round ((78-length(grs))/2);
gotoxy(x,3);write(grs);
gotoxy(x,4);write('Tanggal Pembelian:');
readln;
gotoxy(x,5);write('Nama Pembeli:');
readln;
gotoxy(x,6);write('Alamat:');
readln;
gotoxy(x,7);write(grs);
gotoxy(x,8);writeln('| No | Kode | Nama Barang | Harga Satuan | Jumlah | Jumlah Harga |');
gotoxy(x,9);write(grs);
i := 0;
total_harga := 0;
repeat
i := i+1;
gotoxy(x,9+i);write('|',i);
gotoxy(x+5,9+i);write('|');
gotoxy(x+9,9+i);readln(belanja[i].kode);
if belanja[i].kode <> '' then
begin
gotoxy(x+13,9+i);write(' |');
gotoxy(x+15,9+i);readln(belanja[i].nama_barang);
gotoxy(x+32,9+i);write('|');
gotoxy(x+33,9+i);readln(belanja[i].harga);
gotoxy(x+33,9+i);writeln(belanja[i].harga:10:2);
gotoxy(x+48,9+i);write('|');
gotoxy(x+50,9+i);readln(belanja[i].banyak);
gotoxy(x+57,9+i);write('|');
jum_harga := belanja[i].harga*belanja[i].banyak;
gotoxy(x+58,9+i);writeln(jum_harga:10:2);
gotoxy(x+72,9+i);writeln('|');
total_harga := total_harga + jum_harga;
end;
until
belanja[i].nama_barang='';
j := i-1;
gotoxy(x,10+j);write(grs);
gotoxy(x,10+j+1);write('Total Belanja (Rp) --------------------------------------:');
gotoxy(x+58,10+j+1);write(total_harga:10:2);
gotoxy(x+72,10+j+1);write('|');
gotoxy(x,12+j);write(grs);
end.
Selasa, 27 April 2010
TUGAS AKHIR MODUL 5
Listing Program:
program invers;
var
nomor_menu:integer;
procedure ordo2;
var
A,B,C,D,i,invers:real;
begin
clrscr;gotoxy(20,1);
writeln('Mencari Invers Matriks Ordo 2x2 ');
gotoxy(10,5);write('A=');read(A);
gotoxy(18,5);write('B=');read(B);
gotoxy(10,7);write('C=');read(C);
gotoxy(18,7);write('D=');read(D);
i:=(A*D)-(B*C);
if not(i=0) then
begin
invers:=1/((A*D)-(B*C));
A:=D*invers;
B:=-B*invers;
C:=-C*invers;
D:=A*invers;
gotoxy(25,10);writeln('Invers matriks A =');
gotoxy(10,13);write(A:0:3);
gotoxy(18,13);write(B:0:3);
gotoxy(10,16);write(C:0:3);
gotoxy(18,16);write(D:0:3);
end;
end;
procedure ordo3;
var
A,B,C,D,E,F,G,H,I:real;
ADet,BDet,CDet,DDet,EDet,FDet,GDet,HDet,IDet:real;
Det:real;
AI,BI,CI,DI,EI,FI,GI,HI,II:real;
begin
clrscr;gotoxy(20,1);
writeln('Mencari Invers Matriks Ordo 3x3 ');
gotoxy(10,5);write('A=');read(A);
gotoxy(18,5);write('B=');read(B);
gotoxy(27,5);write('C=');read(C);
gotoxy(10,7);write('D=');read(D);
gotoxy(18,7);write('E=');read(E);
gotoxy(27,7);write('F=');read(F);
gotoxy(10,9);write('G=');read(G);
gotoxy(18,9);write('H=');read(H);
gotoxy(27,9);write('I=');read(I);
{mencari determinan disetiap elemen}
ADet:=(E*I)-(F*H);
BDet:=-((B*I)-(C*H));
CDet:=(B*F)-(C*E);
DDet:=-((D*I)-(F*G));
EDet:=(A*I)-(C*G);
FDet:=-((A*F)-(C*D));
GDet:=(D*H)-(E*G);
HDet:=-((A*H)-(B*G));
IDet:=(A*E)-(B*D);
{DATA TERSEBUT SUDAH HASIL DARI TRANSPOS}
Det:=(A*E*I)+(B*F*G)+(C*D*H)-(C*E*G)-(A*F*H)-(B*D*I);
if not(Det=0) then
begin
AI:=1/Det*((E*I)-(F*H));
BI:=1/Det*(-((B*I)-(C*H)));
CI:=1/Det*((B*F)-(C*E));
DI:=1/Det*(-((D*I)-(F*G)));
EI:=1/Det*((A*I)-(C*G));
FI:=1/Det*(-((A*F)-(C*D)));
GI:=1/Det*((D*H)-(E*G));
HI:=1/Det*(-((A*H)-(B*G)));
II:=1/Det*((A*E)-(B*D));
gotoxy(30,10);
writeln('Invers matriks A =');
gotoxy(10,13);write(AI:0:3);
gotoxy(18,13);write(BI:0:3);
gotoxy(27,13);write(CI:0:3);
gotoxy(10,16);write(DI:0:3);
gotoxy(18,16);write(EI:0:3);
gotoxy(27,16);write(FI:0:3);
gotoxy(10,19);write(GI:0:3);
gotoxy(18,19);write(HI:0:3);
gotoxy(27,19);write(II:0:3);
end;
end;
begin
clrscr;
writeln(' 1.ordo2 ');
writeln(' 2.ordo3 ');
write(' Masukkan pilihan anda= ');readln(nomor_menu);
case nomor_menu of
1:begin
ordo2;
end;
2:begin
ordo3;
end;
end;
end.
Running :