Penghitungan Total Gaji dengan Lazarus

SOAL SOAL LAZARUS-1170

Ada kasus pencarian Total gaji seperti kasus teman kita di banten diatas ini, saya coba menjawabnya dan koreksi jika adayang kurang pas

var
gaji,TGaji,TIstri,TAnak:double;
JKerja,JLembur,TLembur,anak:integer;
gol,status:string;
begin
write (‘Golongan:’);readln(gol);
write (‘Status:’);readln(status);
write (‘Jumlah Anak:’);readln(anak);
TIstri:=0;
TAnak:=0;
if gol=’a’ then gaji:=2000000;
if gol=’b’ then gaji:=1500000;
if gol=’c’ then gaji:=1000000;
if status=’nikah’ then TIstri:=(gaji*10)/100;
if anak>2 then TAnak:=(gaji*6)/100 else TAnak:=anak*(6*gaji)/100;
Tgaji:=gaji+TIstri+TAnak;
write(‘Total Gaji:’,TGaji);
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