0% found this document useful (0 votes)
86 views2 pages

Program Perpustakaan &amp DATA BARANG

The document is a Pascal program that: 1) Defines arrays to store book data like code, title, author, etc that are entered by the user. 2) Prompts the user to enter the number of transactions and then loops to input the data for each one. 3) Prints a table displaying all the input book data. 4) Includes comments identifying the programmer and school/university information.

Uploaded by

4riefLien4
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views2 pages

Program Perpustakaan &amp DATA BARANG

The document is a Pascal program that: 1) Defines arrays to store book data like code, title, author, etc that are entered by the user. 2) Prompts the user to enter the number of transactions and then loops to input the data for each one. 3) Prints a table displaying all the input book data. 4) Includes comments identifying the programmer and school/university information.

Uploaded by

4riefLien4
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

TUGAS PROGRAM ARRAY

Program Perpustakaan{By:M.ARIFIN};

Uses Crt;
Const
Programer=' -=[ 4r13f $0ftw4r3 ]=-' ;
Batas ='~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~';
Prog =' -*={ DATA TRANSAKSI PERPUSTAKAAN }=*-';
var
kd_Book :array [1..20] of string [50];
jdl_Book :array [1..20] of string [50];
Pengarang :array [1..20] of string [50];
penerbit :array [1..20] of string [50];
th_terbit :array [1..20] of string [50];
tbl_Book :array [1..20] of string [50];
harga_bk :array [1..20] of string [50];
arief,liena,honey : Integer;

begin
clrscr;
gotoxy(1 ,2 ); write(programer );
gotoxy(1 ,8 +arief ); write(prog );
gotoXY(15,10+arief ); write(' -#{ Berapa Transaksi Yang Akan dilakukan? }#- ' );readln(honey);
for liena:=1 to honey do
begin
09 Januari 2010

arief :=7;
clrscr;
gotoXY(30,3 ); write('*{ DATA TRANSAKSI YANG',liena:2,' }*');
gotoXY(15,2+arief); write('KODE BUKU = ');readln(kd_book [liena]);
gotoXY(15,3+arief); write('JUDUL BUKU = ');readln(jdl_Book [liena]);
gotoXY(15,4+arief); write('PENGARANG = ');readln(pengarang [liena]);
gotoXY(15,5+arief); write('PENERBIT = ');readln(penerbit [liena]);
gotoXY(15,6+arief); write('TAHUN TERBIT = ');readln(th_terbit [liena]);
gotoXY(15,7+arief); write('TEBAL BUKU = ');readln(tbl_Book [liena]);
gotoXY(15,8+arief); write('HARGA BUKU = ');readln(harga_bk [liena]);
end;
clrscr;
writeln (' ' );
writeln (prog );
writeln (' ' );
writeln (' ' );
writeln (' #######################################################################');
writeln (' KODE | JUDUL BUKU | PENGARANG | PENERBIT | TAHUN | TEBAL | HARRGA ');
writeln (' *****************************************************************************************************’);
for liena:=1 to honey do
begin
gotoxy(2 ,arief+1); write(‘| ‘,kd_book [liena]);
gotoxy(7 ,arief+1); write('| ',jdl_book [liena]);
gotoxy(24,arief+1); write('| ',pengarang [liena]);
gotoxy(39,arief+1); write('| ',penerbit [liena]);
gotoxy(52,arief+1); write('| ',th_terbit [liena]);
gotoxy(60,arief+1); write('| ',tbl_book [liena]);
gotoxy(68,arief+1); write('| ',harga_bk [liena]);

arief :=arief+1;

end;
gotoXY(2 ,arief+4 );Write (batas );
gotoXY(2 ,arief+6 );Write (programer);
gotoXY(19,arief+8);Write ('Silahkan tekan sembarang tombol untuk keluar');
readkey;
End.

Jurusan : S1 T.Informatika STT Nurul Jadid Paiton - Probolinggo


TUGAS PROGRAM ARRAY

Program Data_Barang_By_{M.ARIFIN};

Uses Crt;
Const
pembuat='*-#< 4r13f $0ftw4r3 >#-*';
garis ='###############################################################################’;
garis1 ='~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~’;
Jurusan=' *-{ S1 T.Informatika STT NURUL JADID # Paiton - Probolinggo}- * ' ;
Built ='Copyright (c) 2010-2015 [email protected]' ;

Var
Harga,jumlah : Array [1..1000000] Of 0..1000000 ;
Kode_Barang : Array [1..100] Of String [100] ;
Nama_barang : Array [1..100] Of String [100] ;
honey,love,liena : Integer ;
total : Real ;
arief : Char ;
Begin
ClrScr;
Writeln (' ');
Writeln (' *-< 4r13f $0ftw4r3 >-*' );
Writeln (' ');
Writeln (' ');
Writeln (' ');
09 Januari 2010

Writeln (' ');


Writeln (' -*{ Program Data Transaksi Barang }*- ' );
Writeln (' ');
Write (' Berapa Data Yang Ingin Anda Inputkan? '); Readln (honey);
For love:= 1 To honey Do

Begin
ClrScr;
GotoXY(33,2) ; write('*-< 4r13f $0ftw4r3 >-*');
GotoXY(30,4+1) ; Write('-+[ Transaksi Yang Ke-',love:2,' ]+-' );
GotoXY(10,7+love) ; Write('Kode Barang : '); Readln (Kode_Barang [love]);
GotoXY(10,8+love) ; Write('Nama Barang : '); Readln (Nama_barang [love]);
GotoXY(10,9+love) ; Write('Harga : '); Readln (harga [love]);
GotoXY(10,10+love) ; Write('Jumlah : '); Readln (jumlah [love]);
End;
ClrScr;
gotoXY(26,2) ; Write (pembuat );
GotoXY(4,4) ; Write (Garis );
GotoXY(4,5) ; Write ('| No' );
GotoXY(9,5) ; Write ('| Kode Barang' );
GotoXY(24,5) ; Write ('| Nama Barang' );
GotoXY(40,5) ; Write ('| Harga' );
GotoXY(50,5) ; Write ('| Jumlah' );
GotoXY(60,5) ; Write ('| Total Harga' );
GotoXY(4,6) ; Write (Garis1 );
liena := 7;
For love:= 1 To honey Do
Begin
total :=(harga[love]*jumlah [love] );
GotoXY(4, liena); Write ('| ',love:2 );
GotoXY(9, liena); Write ('| ',Kode_Barang [love] );
GotoXY(24,liena); Write ('| ',Nama_Barang [love] );
GotoXY(40,liena); Write ('| ',harga [love] );
GotoXY(50,liena); Write ('| ',Jumlah [love]:0 );
GotoXY(60,liena); Write ('| ',total:0:0 );
GotoXY(54,liena); Write (arief );
liena:=liena+1 ;
End;
GotoXY(4,liena+2 );Write(garis1 );
GotoXY(4,liena+4 );Write(Jurusan );
GotoXY(15,liena+6 );Write(Built );
Readkey;

End.

Jurusan : S1 T.Informatika STT Nurul Jadid Paiton - Probolinggo

You might also like