uses wincrt;
var gol:integer;
gaji,pajak,bonus,libur,a,b,upah,jam: real;
nama:string;
begin
clrscr;
write('Nama Pekerja: ');readln(nama);
write('Golongan : ');readln(gol);
If gol>6 then writeln ('golongan yang anda masukkan salah!')
else
write('Jam Kerja: ');readln(jam);
write('Upah Per Jam: ');readln(upah);
case gol of
1: begin
gaji:=gol*jam*upah;
pajak:=2.5/100*gaji;
a:=21 div gol;
b:=21 mod gol;
bonus:=gol*25000;
end;
2: begin
gaji:=gol*jam*upah;
pajak:=2.5/100*gaji;
a:=21 div gol;
b:=21 mod gol;
bonus:=gol*25000;
end;
3: begin
gaji:=gol*jam*upah;
pajak:=2.5/100*gaji;
a:=21 div gol;
b:=21 mod gol;
bonus:=gol*25000;
end;
4: begin
gaji:=gol*jam*upah;
pajak:=6.5/100*gaji;
a:=7 div gol;
b:=7 mod gol;
bonus:=gol*50000;
end;
5: begin
gaji:=gol*jam*upah;
pajak:=3.5/100*gaji;
a:=7 div gol;
b:=7 mod gol;
bonus:=gol*45000;
end;
6: begin
gaji:=gol*jam*upah;
pajak:=5.5/100*gaji;
a:=7 div gol;
b:=7 mod gol;
bonus:=gol*40000;
end;
end;
if b>0 then
libur:=a+1
else
libur:=a;
writeln('Gaji Anda= Rp. ',gaji:0:2);
writeln('Anda Terkena Pajak= Rp. ',pajak:0:2);
writeln('Anda Mendapat Bonus= Rp. ',bonus:0:2);
writeln('Anda Boleh Cuti Sebanyak ',libur:0:0,' hari');
readkey;
end.
2 komentar:
Code code apa nih :D
itu sintax dlm pascal
Posting Komentar