Belajar Membut Aplikasi Dengan Pascal
Program Gaji_Karyawan
Uses crt
Var
Gp,gb,pjk,js,tis,ta,tjb:real;
Nik :string[10];
Nk :string[27];
Sts :string[9];
Jb :string[15];
Ja :byte;
Begin
Clrscr;
Write(‘Nomor Induk Karyawan:’);
Readln(Nik);
Write(‘Nama Karyawan:’);
Readln(Nk);
Write(‘Status:’);
Readln(Sts);
Write(‘Jumlah Anak:’);
Readln(Ja);
Write(‘Gaji Pokok:’);
Readln(Gk);
Write(‘apakah mau di ulang lagi (y/n) :’);
If sts=’menikah’ then begin
Tis:=0.1*gp;
End
Else end
Tis:=0;
End;
If
ja<=3 Then begin Ta:=0.02*gp*ja;
End
else
If
ja >3 then begin ta:=0.058g*3;
End
else
Begin
Ta:=0;
End;
If jb=’manager’ then begin
Tjb:=2000000;
End
else
If
jb=’supevisor’ then begin
Tjb:=1500000;
End
Else
If
jb=’mandor’ then begin
Tjb:=1000000;
End
Else
Tjb:=0;
End;
Pjk:=0.025*gp;
Js:=0.01*gp;
Gb:=(gp+tis+tjb)-(pjk+js);
Writeln(‘tunjangan
istri=’.tis:3:2);
Writeln(‘tunjangan
anak=’.ta:3:2);
Writeln(‘tunjangan
jabatan=’.tjb:3:2);
Writeln(‘pajak=’.pjk:3:2);
Writeln(‘jamsostek=’.js:3:2);
Writeln(‘gaji
bersih=’.gb:3:2);
Readkey;
End.
Komentar
Posting Komentar