Contoh Program Pascal gaji karyawan

Program untuk Gaji Karyawan


uses wincrt;
type pegawai = record
nama:string[20];
nip :integer;
gaji :integer;
tunjangan : real;
end;
var
karyawan : array[1..20] of pegawai;
jum,i : byte;
begin
clrscr;
write('Jumlah Data : ');readln(jum);
for i:=1 to jum do
begin
with karyawan[i] do
begin
writeln;
write('Nama Karyawan : ');readln(nama);
write('NIP : ');readln(nip);
write('Gaji : ');readln(gaji);
write('Tunjangan : ');readln(tunjangan);

if gaji > 1000000 then
writeln(nama);
writeln(nip);
writeln(gaji:0);
end;
end;
writeln;
writeln('------------------------------------');
writeln('NIP Nama Karyawan Gaji');
writeln('------------------------------------');
for i:=1 to jum do
begin
with karyawan[i] do
end;
writeln('------------------------------------');
readln;
end.

1 comments:

Anonymous said...

jadi inget zaman awal kuliah dulu haha

Post a Comment