#include <conio.h>
#include <stdio.h>
#include <iostream.h>
#include <iomanip.h>
main()
{
char nama[35][10];
int i,j,gol[10],pen[10],jam[10],lembur1[10],lembur2[10];
long tunbat[10],tunpen[10],bersih[10],jumji[10],total[10],pajak[10];
cout<<"==========================================="<<endl;
cout<<" Program Hitung Karyawan Kontrak "<<endl;
cout<<" PT. STAY COOL "<<endl;
cout<<"==========================================="<<endl;
cout<<" Masukkan jumlah karyawan =";cin>>j;
cout<<endl;
for(i=1;i<=j;i++)
{
cout<<" Karyawan Ke- "<<i<<endl;
cout<<" Nama Karyawan =";gets(nama[i]);
cout<<" Golongan[1/2/3] =";cin>>gol[i];
cout<<" Pendidikan[1=SMA/2=D3/3=S1] =";cin>>pen[i];
cout<<" Jumlah Jam Kerja =";cin>>jam[1];
cout<<endl;
if(gol[i]==1)
tunbat[i]=0.05*700000;
else
if(gol[i]==2)
tunbat[i]=0.1*700000;
else
tunbat[i]=0.15*700000;
if(pen[i]==1)
tunpen[i]=0.05*700000;
else
if(pen[i]==2)
tunpen[i]=0.1*700000;
else
tunpen[i]=0.15*700000;
lembur1[i]=jam[1]-240;
if(lembur1[i]>0)
lembur2[i]=lembur1[i]*2500;
else
lembur2[i]=0;
jumji[i]=700000+tunbat[i]+tunpen[i];
pajak[i]=0.1*jumji[i];
bersih[i]=jumji[i]-pajak[i];
}
clrscr();
cout<<" PT. STAY COOL "<<endl;
cout<<"-------------------------------------------------------------------"<<endl;
cout<<" No Nama Tunjangan "<<endl;
cout<<" karyawan ------------------- honor pajak pendapatan"<<endl;
cout<<" Jabatan Pendidikan Lembur Bersih "<<endl;
cout<<"-------------------------------------------------------------------"<<endl;
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(5)<<i;
cout<<setiosflags(ios::left)<<setw(10)<<nama[i];
cout<<setiosflags(ios::left)<<setw(15)<<tunbat[i];
cout<<setiosflags(ios::left)<<setw(10)<<tunpen[i];
cout<<setiosflags(ios::left)<<setw(10)<<lembur2[i];
cout<<setiosflags(ios::left)<<setw(10)<<pajak[i];
cout<<setiosflags(ios::left)<<setw(10)<<bersih[i]<<endl;
total[i]=total[i]+bersih[i];
}
cout<<"-------------------------------------------------------------------"<<endl;
cout<<" Total Honor Gaji karyawan ="<<total[i]<<endl;
getch();
}
No comments:
Post a Comment