program saya;
uses wincrt;
type
gajipokok=record
nama:string[10];
gaji:longint;
jam:integer;
s:string;
t:real;
uanglembur:longint;
gajibersih:real;
end;
var
i,n:integer;
g:array[1..100] of gajipokok;
begin
writeln('**********************************************');
writeln('SELAMAT DATANG DI PROGRAM GAJI');
WRITELN;
writeln('ada berapa pegawai yang akan menerima gaji : ');readln(n);
writeln;
writeln('Isi Data Berikut : ');
for i:=1 to n do
begin
with g[i] do
begin
write('Nama Pegawai ',i,' : ');readln(nama);
write('Gaji : Rp ');readln(gaji);
write('Jam lembur : ');readln(jam);
write('anda sudah menikah ? (y/n) : ');readln(s);
if (s='y') or (s='Y') then
begin
t:=gaji*0.25;
uanglembur:=25000*jam;
gajibersih:=gaji+uanglembur+t;
writeln('anda sudah menikah');
end;
if (s='n') or (s='N') then
begin
t:=gaji*0.15;
uanglembur:=20000*jam;
gajibersih:=gaji+uanglembur+t;
writeln('anda belum menikah');
end;
writeln;
end;
end;
clrscr;
writeln('TABEL PEGAWAI DANNJUMLAH GAJINYA');
WRITELN;
writeln('No Nama Pegawai Gaji Pokok Tunjangan Uang Lembur Gaji Bersih');
for i:=1 to n do
begin
with g[i] do
begin
writeln(i:2,nama:12,gaji:11,t:10:1,uanglembur:14,gajibersih:13:1);
end;
end;
end.
Thursday, 3 July 2014
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment