Program untuk Gaji Karyawan
uses wincrt;
type pegawai = recordnama:string[20];nip :integer;gaji :integer;tunjangan : real;end;varkaryawan : array[1..20] of pegawai;jum,i : byte;beginclrscr;write('Jumlah Data : ');readln(jum);for i:=1 to jum dobeginwith karyawan[i] dobeginwriteln;write('Nama Karyawan : ');readln(nama);write('NIP : ');readln(nip);write('Gaji : ');readln(gaji);write('Tunjangan : ');readln(tunjangan);if gaji > 1000000 thenwriteln(nama);writeln(nip);writeln(gaji:0);end;end;writeln;writeln('------------------------------------');writeln('NIP Nama Karyawan Gaji');writeln('------------------------------------');for i:=1 to jum dobeginwith karyawan[i] doend;writeln('------------------------------------');readln;end.
1 comments:
jadi inget zaman awal kuliah dulu haha
Post a Comment