Pembuatan Program Laporan Transaksi Dagang dengan Turbo Pascal

program serdam_burger;
uses crt;

type
guru=record
nip:string;
nama_guru:string;
gol:string;
jumlah:integer;
subtotal:real;
end;

var
gr:array [1..10] of guru;
i:integer;
b,a:real;
jml:integer;
total:real;
honor:real;
begin
clrscr;
writeln(‘======================================================’);
writeln(‘        PROGRAM HITUNG HONORIUM GURU HONORER          ‘);
writeln(‘======================================================’);
write(‘Masukan Jumlah Data Guru : ‘);readln(jml);
writeln;

if jml>10 then
begin
writeln(‘Melebihi Kapasitas’);
end
else
begin
for i:=1 to jml do
begin
with gr[i] do
begin
write(‘Transaksi ke- ‘,i,’ dari ‘,jml);writeln;
write(‘NIP              : ‘);readln(nip);
if (nip =’13540121’) then
begin
nama_guru:=’Eva Meilinda,S.Kom ‘;
gol:=’I’;
end
else
if (nip =’13540424′) then
begin
nama_guru:=’Ade Hendiani,S.Kom ‘;
gol:=’I’;
end
else
if (nip =’13540488′) then
begin
nama_guru:=’Deni Maulana,ST ‘;
gol:=’II’;
end
else
if (nip =’13540773′) then
begin
nama_guru:=’Abdul Majid,S.Si ‘;
gol:=’II’;
end
else
if (nip =’13540999′) then
begin
nama_guru:=’Desy R. Sari,M.Msi ‘;
gol:=’III’;
end
else
begin
nama_guru:=”;
end;
write(‘ Nama Guru       : ‘,nama_guru);writeln;
write(‘ Golongan        : ‘,gol);writeln;
write(‘ Jumlah Mengajar : ‘);readln(jumlah);
writeln;
end;
end;
writeln;
writeln(‘============================================================================’);
writeln(‘NIP’:10,’Nama’:23,’Golongan’:10,’Honor’:11,’Jam’:12,’Total’:11);
writeln(‘   ‘:10,’Guru’:23,’        ‘:10,’     ‘:11,’Mengajar’:12,”:11);
writeln(‘============================================================================’);
total:=0;
b:=9999999;
a:=0;
for i:=1 to jml do
begin
with gr[i] do
begin
if (gol=’I’) then
honor:=15000
else
if (gol=’II’) then
honor:=26500
else
if (gol=’III’) then
honor:=88000
else
honor:=0;
subtotal:=honor*jumlah;
writeln(nip:10,nama_guru:23,gol:10,honor:11:2,jumlah:12,subtotal:11:2);
total:=total+(subtotal);
if subtotal>a then
begin
a:=subtotal;
end;
if subtotal<b then b:=subtotal;
end;
end;
end;
writeln(‘============================================================================’);
writeln;
writeln(‘                                         Total Keseluruhan      :Rp.’,total:2:2);
write(‘                                         Total Honor Tertinggi  :Rp.’,a:2:2);
writeln;
write(‘                                         Total Honor Terendah   :Rp.’,b:2:2);
readln;
end.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s