uses crt;
var
gapok, tanak , gatot: real;
n, golongan, status: integer;
nama , gol : string;
begin
writeln ('Menghitung Gaji Karyawan');
writeln ('========================');
writeln ('Golongan : 1. III 2. IV 3. V ');
writeln ('Status : 1. Menikah 2. Single ');
writeln ('========================');
write ('Masukkan Nama Karyawan : '); read(nama);
write ('Pilih Nomor Golongan : '); read(golongan);
if (golongan = 1) then
begin gapok := 2000000;
gol := 'III';
end
else
if (golongan = 2) then
begin
gapok := 3000000;
gol := 'IV';
end
else
if (golongan = 3) then
begin
gapok := 4000000;
gol := 'V';
end
else
writeln('Nomor Golongan Salah');
write ('Pilih nomor Status : '); read(status);
if (status = 1 ) then
begin
writeln ('Masukkan jumlah anak: '); read(n);
if (n > 2 ) then
tanak := 2 *(10/100 * gapok)
else
tanak := n *(10/100 * gapok);
end
else
tanak := 0;
writeln ('========================');
writeln ('Nama Karyawan : ', nama);
writeln ('Golongan : ', gol);
writeln ('Gaji Pokok : ', gapok:0:2);
writeln ('Tunjangan Anak: ', tanak:0:2);
gatot := gapok + tanak;
writeln ('Total gaji : ', gatot:0:2);
readln;
readln;
end.
Sign up here with your email
ConversionConversion EmoticonEmoticon