#include<conio.h>
#include<stdio.h>
#include<iostream.h>
#include<iomanip.h>
main( )
{
int i,honor,jukar,tunjangan[10],jamker,holem[10],pajak[10],pendapatan[10],total;
char nama[10][20],golo;
cout<<"\n PT. STAY COOL\n";
cout<<"-----------------------------------------------------------------"<<endl;
cout<<"Honor/bln(240jam) Tunjangan Jabatan Honor Lembur Pajak"<<endl;
cout<<" Golongan | Persentase "<<endl;
cout<<"700.000 1 | 5% 2.500/jam 10% "<<endl;
cout<<" 2 | 10% "<<endl;
cout<<" 3 | 15% "<<endl;
cout<<"================================================================="<<endl;
cout<<"\n\n Program Hitung Honor Karyawan Kontrak "<<endl;
cout<<" PT.STAY COOL "<<endl;
cout<<"-----------------------------------------------------------------"<<endl;
total=0;
cout<<"Jumlah Karyawan : ";cin>>jukar;
for (i=1;i<=jukar;i++)
{
honor=700000;
cout<<"\n Karyawan Ke-"<<i<<endl;
cout<<"Nama Karyawan : ";gets(nama[i]);
cout<<"Golongan (1/2/3) : ";cin>>golo;
if(golo=='1')
tunjangan[i]=5*honor/100;
else if(golo=='2')
tunjangan[i]=10*honor/100;
else if(golo=='3')
tunjangan[i]=15*honor/100;
cout<<"Jumlah Jam Kerja : ";cin>>jamker;
if(jamker>240)
holem[i]=(jamker-240)*2500;
else
{holem[i]=0; }
pajak[i]=(honor+tunjangan[i]+holem[i])*10/100;
pendapatan[i]=(honor+tunjangan[i]+holem[i])-pajak[i];
{total=total+pendapatan[i];}
}
cout<<"\n\n PT. STAY COOL\n";
cout<<"-----------------------------------------------------------------"<<endl;
cout<<"No. Nama Tunjangan Honor Pajak Pendapatan "<<endl;
cout<<" Karyawan Jabatan Lembur Bersih "<<endl;
cout<<"-----------------------------------------------------------------"<<endl;
for(i=1;i<=jukar;i++)
{
cout<<setiosflags(ios::left)<<setw(4)<<i;
cout<<setiosflags(ios::left)<<setw(15)<<nama[i];
cout<<setprecision(2)<<setw(13)<<tunjangan[i];
cout<<setprecision(2)<<setw(12)<<holem[i];
cout<<setprecision(2)<<setw(11)<<pajak[i];
cout<<setprecision(2)<<setw(10)<<pendapatan[i]<<endl;
}
cout<<"================================================================="<<endl;
cout<<" Total Gaji yang dikeluarkan Rp."<<total<<endl;
getch();
}
Tidak ada komentar:
Posting Komentar