Perhitunga Penggajian Karyawan
Ini lah program perhitungan Gaji pegawai
#include <cstdlib>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
char nama;/**/char
gol;
int
gaji_pokok;
int
gaji_lembur=45000,lama_lembur,;
cout<<"DAFTAR PERHITUNGAN GAJI PEGAWAI\n==========================================================\n\n";
cout<<"Nama Pegawai
:";fflush(stdin);cin.get(nama);
cout<<"Jabtan<Kepala_bagian, Jabatan_Mandor, Jabatan_Staff> :";fflush(stdin);cin>>gol;
cout<<"\n";
//Penentuan
Gaji_Pokok
if (gol ==
'1')
{gaji_pokok=2500000;}
else
if (gol == 'Kepala Bagian')
{gaji_pokok=1750000;}
else
if (gol == 'Jabtan_Mandor')
{gaji_pokok=1250000;}
//-Penentuan
Gaji_Pokok
cout<<"Gaji Pokok
: Rp."<<gaji_pokok<<"\n";
cout<<"Lama Lembur
: ";cin>>lama_lembur;
//Rumus
Perhitungan
int
total_gaji_lembur=gaji_lembur*lama_lembur;
int
gaji_kotor=gaji_pokok+total_gaji_lembur;
int
pajak=0.05*gaji_kotor;
long
int total_gaji_kotor=gaji_pokok+total_gaji_lembur;
int asuransi=0.05*total_gaji_kotor;
//-Rumus
Perhitungan
cout<<"Total Gaji Lembur
: Rp."<<total_gaji_lembur<<"\n";
cout<<"Gaji Kotor
: Rp."<<gaji_kotor<<"\n";
cout<<"\n";
cout<<"POTONGAN
\n";
cout<<"Pajak
<0.05%> :
Rp."<<pajak<<"\n";
cout<<"Gaji Bersih
: Rp."<<gaji_bersih<<"\n";
system("PAUSE");
return
EXIT_SUCCESS;
}
}
Hasil Program