Penghitungan penggajian dengan lazarus

SOAL SOAL LAZARUS-1168Menyelesaikan persoalan pemrograman diperlukan ketelitian dan kejelian, dan logika yang harus sering diasah. Mari kita selesaikan sebuah persoalan berikut.

var
gaji,TGaji:double;
JKerja,JLembur,TLembur:integer;
gol:string;
begin
write (‘Golongan:’);readln(gol);
JLembur:=0;

write (‘Jam Kerja:’);readln(JKerja);
if JKerja >160 then JLembur:=JKerja-160;

TLembur:=JLembur*10000;
if gol=’a’ then
begin
TGaji:=2000000+TLembur;
write (‘Total gaji :’,TGaji);
readln;
end;
if gol=’b’ then
begin
TGaji:=1500000+TLembur;
write (‘Total gaji :’,TGaji);
readln;
end;
if gol=’c’ then
begin
TGaji:=1000000+TLembur;
write (‘Total gaji :’,TGaji);
readln;
end;
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