uses wincrt;
type
Tpegawai=record
nip:longint;
nama:string[20];
golongan:longint;
Jmk:longint;
end;
var
peg:array[1..50] of Tpegawai;
GjP,ins,gaji:real;
gol,Jmk:integer;
Bnyk,Ulang:integer;
begin
Ulang:=1;
write('Masukkan jumlah pegawai: '); readln(Bnyk);
writeln('*************************************************************');
writeln(' Entry data pegawai PT. LUPA');
writeln('*************************************************************');
for Ulang:= 1 to Bnyk do
begin
write('nip : '); readln(peg[Ulang].nip);
write('nama : '); readln(peg[Ulang].nama);
write('golongan|1|2|3 : '); readln(peg[Ulang].golongan);
write('jam kerja/bulan(jam) : '); readln(peg[Ulang].Jmk);
writeln;
gotoxy(1,12); writeln('laporan gaji pegawai');
gotoxy(1,13); writeln('PT. Mataram');
writeln;
writeln('*************************************************************');
for Ulang:= 1 to Bnyk do
begin
writeln(' ','nip','':4,'nama','':8,'golongan','':5,'jam kerja','':10,'gaji');
writeln('*************************************************************');
with peg[Ulang] do
begin
ins:=Jmk*10000;
case golongan of
1: GjP:=1000000;
2: GjP:=1500000;
3: GjP:=2000000;
else
GjP:=0;
end;
gaji:=GjP*ins;
writeln('':2,nip,'':6,nama,'':12,golongan,'':12,Jmk,'':10,gaji:0:2);
writeln('*************************************************************');
end;
writeln;
end;end;end.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment