Mlente Banget

Pascal – Penghitungan gaji dan Tunjangan Anak Istri

Posted on: November 19, 2008


Tugas Pascal menghitung gaji dan tunjangan anak/istri :

uses wincrt;

var
nama,jab:string[25];
noin    :string[10];
gol     :char;
stat,jmlanak:integer;
gaj,tist,tank,jmltgaj,tlgaj:real;

begin
clrscr;
writeln(‘===============================================’);
writeln(‘TUGAS PERHITUNGAN GAJI DAN TUNJANGAN ANAK ISTRI’);
writeln(‘     Nama : Mahasiswa NIM : xxxxxxxxx                           ‘);
writeln(‘===============================================’);
writeln;
writeln(‘  Masukkan data sesuai pada ketentuan berikut  ‘);
writeln(‘+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+’);
writeln;
writeln(‘Golongan Gaji :           Status :’);
writeln(‘a. Rp 1,000,000.00        1. Kawin’);
writeln(‘b. Rp 1,500,000.00        2. Tidak Kawin’);
writeln(‘c. Rp 2,000,000.00’);
writeln;
write(‘Nomor Induk Karyawan : ‘);readln(noin);
write(‘Nama Pegawai         : ‘);readln(nama);
write(‘Jabatan Pegawai      : ‘);readln(jab);
write(‘Golongan Gaji        : ‘);readln(gol);

case gol of
‘a’ : begin
gaj :=1000000;
write(‘Status Perkawinan    : ‘);readln(stat);
case stat of
1 : begin
tist := (10/100)*gaj;
write(‘Jumlah anak          : ‘);readln(jmlanak);
if jmlanak =1 then
tank := (10/100)*gaj
else
if jmlanak =2 then
tank := (15/100)*gaj
else
tank := (20/100)*gaj
end;
2 : begin
tist := 0;
tank := 0;
end;

end;
end;
‘b’ : begin
gaj :=1500000;
write(‘Status Perkawinan    : ‘);readln(stat);
case stat of
1 : begin
tist := (15/100)*gaj;
write(‘Jumlah anak          : ‘);readln(jmlanak);
if jmlanak =1 then
tank :=(10/100)*gaj
else
if jmlanak =2 then
tank :=(15/100)*gaj
else
tank :=(20/100)*gaj
end;
2 : begin
tist := 0;
tank := 0;
end;

end;
end;
‘c’ : begin
gaj :=2000000;
write(‘Status Perkawinan    : ‘);readln(stat);
case stat of
1 : begin
tist := (20/100)*gaj;
write(‘Jumlah anak          : ‘);readln(jmlanak);
if jmlanak =1 then
tank :=(10/100)*gaj
else
if jmlanak =2 then
tank :=(15/100)*gaj
else
tank :=(20/100)*gaj
end;
2 : begin
tist :=0;
tank :=0;
end;

end;
end;

end;

tlgaj      := gaj+tank+tist;

writeln;
writeln(‘=================oO SLIP GAJI Oo=================’);
writeln;
writeln (‘Nama          : ‘,nama);
writeln (‘No Karyawan   : ‘,noin);
writeln (‘Jabatan       : ‘,jab);
writeln (‘+===============================================+’);
writeln (‘|       Rincian Gaji         |      Jumlah      |’);
writeln (‘+===============================================+’);
writeln (‘| Gaji Pokok               : | Rp ‘,gaj:8:0,’      |’);
writeln (‘| Tunjangan Anak           : | Rp ‘,tank:8:0,’      |’);
writeln (‘| Tunjangan Istri          : | Rp ‘,tist:8:0,’      |’);
writeln (‘|                            |                  |’);
writeln (‘+———————————————–+’);
writeln (‘| Total Gaji Bersih        : | Rp ‘,tlgaj:8:0,’      |’);
writeln (‘+———————————————–+’);

readln;

end.

Selamat Mencoba

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

About Me

Unknown unordinary creature
 






November 2008
M T W T F S S
« Oct   Dec »
 12
3456789
10111213141516
17181920212223
24252627282930

Blog Stats

  • 132,030 hits

Your Information

Tracker

%d bloggers like this: