Contoh Program Penggajian Karyawan dengan menggunakan Array
M-S Blog || Contoh Program Penggajian Karyawan menggunakan Array dengan Pascal || Berikut ini adalah script untuk Penggajian Karyawan dengan Pascal
Uses WinCrt;
Var nama19 :array [1..50] of string;
gapok19,tji19,tja19,gaber19 :array [1..50] of real;
gol19,status19,lagi :array [1..50] of char;
anak19,a19,b19,jd19 :byte;
Label atas,ulang;
Begin
atas:
clrscr;
gotoxy(10,2); writeln ('=======================================================');
gotoxy(10,3); writeln ('================== Penggajian Karyawan ================');
gotoxy(10,4); writeln ('=======================================================');
gotoxy(10,6); write(' Masukkan Jumlah Data : ');readln(jd19);
for a19:= 1 to jd19 do
Begin
clrscr;
gotoxy(13,4); writeln('=====================================================');write;
gotoxy(13,5); writeln('=============== Penggajian Karyawan ===============');write;
gotoxy(13,6); writeln('=====================================================');writeln;
gotoxy(6,9); write('Masukkan Nama Karyawan : '); readln(nama19[a19]);
gotoxy(6,10); write('Golongan Karyawan [A/B/C] : '); readln(gol19[a19]);
case gol19[a19] of
'A','a':
begin
gapok19[a19]:=1000000;
end;
'B','b':
begin
gapok19[a19]:=750000;
end;
'C','c':
begin
gapok19[a19]:=500000;
end;
end;
gotoxy(6,11); write('Status Karyawan [N/B] : '); readln(status19[a19]);
case status19[a19] of
'N','n':
begin
gotoxy(45,11);
writeln('/Nikah');
tji19[a19]:=10/100*gapok19[a19];
gotoxy(6,12); write('Jumlah Anak : '); readln(anak19);
if (anak19<=2) then
tja19[a19]:=5/100*gapok19[a19]*anak19
else
tja19[a19]:=5/100*gapok19[a19]*2;
end;
'B','b':
begin
gotoxy(45,11);
writeln('/Belum Nikah');
tji19[a19]:=0;
tja19[a19]:=0;
anak19:=0;
gotoxy(6,12); writeln('Jumlah Anak : Belum Nikah');
end;
end;
gotoxy(6,13); writeln('Gaji Pokok : Rp. ',gapok19[a19]:8:2);
gotoxy(6,14); writeln('Tunjangan Istri : Rp. ',tji19[a19]:8:2);
gotoxy(6,15); writeln('Tunjangan Anak : Rp. ',tja19[a19]:8:2);
gaber19[a19]:=gapok19[a19]+tji19[a19]+tja19[a19];
gotoxy(6,16); write('Gaji Bersih : Rp. ',gaber19[a19]:8:2); writeln;
end;
clrscr;
for b19 := 1 to jd19 do
Begin
writeln ('=======================================================');
writeln ('================== Penggajian Karyawan ================');
writeln ('=======================================================');
writeln ('Nama Karyawan : ' , nama19[b19]);
writeln ('Gol Karyawan : ' , gol19[b19]);
writeln ('Status Karyawan : ' , status19[b19]);
writeln ('Jumlah Anak : ' , anak19);
writeln ('Gaji Pokok : Rp ' , gapok19[b19]:8:2);
writeln ('Tunjangan Istri : Rp ' , tji19[b19]:8:2);
writeln ('Tunjangan Anak : Rp ' , tja19[b19]:8:2);
writeln ('Gaji Bersih : Rp ' , gaber19[b19]:8:2);
writeln ('-------------------------------------------------------');
readln;
End;
readln;
write('Apakah Anda Ingin Input Lagi [Y/N] ? '); readln(lagi[a19]);
case lagi[a19] of
'N','n':goto ulang;
'Y','y':goto atas;
end;
ulang:
End.
ScreenShoot:
1 |
2 |
3 |
4 |
5 |
# jika ada pertanyaan mengenai Contoh Program Penggajian Karyawan dengan menggunakan Array | Pascal silahkan berkomentar !
0 komentar:
Post a Comment