Friday, 15 January 2010

Program Hitung Honor Karyawan Kontrak

#include”stdio.h”
#include”iostream.h”
#include”string.h”
#include”iomanip.h”
#include”conio.h”
main()
{
int jk;
int a;
char n [20][20];
int g [20];
int p [20];
int jk[20];
int tj[3]={35000,70000,105000};
int tp[3]={17500,35000,52500};
int h=700000;
int l [20];
int hl[20];
int pj[20];
int pb[20];
int tg=0;
clrscr();
cout<<"Program Hitung Honor Karyawan Kontrak"<cout<<"PT. STAY COOL"<cout<<"Masukkan Jumlah Karyawan : ";cin>>jk;
cout<for(a=1;a<=jk;a++)
{
cout<<"Karyawan ke - "<cout<<"Nama Karyawan : ";gets(n[a]);
cout<<"Golongan [1/2/3] : ";cin>>g[a];
cout<<"Pendidikan (1=SMU/2=D3/3=S1) : ";cin>>p[a];
cout<<"Jumlah Jam Kerja : ";cin>>jk[a];
NAMA : ARIS NURDIAN
NIM : 18094136
KELAS : 12.IC.21 (B)
TUGAS LATIHAN 7.4 (3)
cout<l[a]=jk[a]-240; //240 jam kerja sebulan
hl[a]=l[a]*2500;
}
clrscr();
cout<<"PT. STAY COOL"<cout<<"----------------------------------------------------------------------";
cout<<"-------"<cout<<"No."<<" "<<"Nama"<<" "<<"Tunjangan"<cout<<" "<<"Karyawan"<<" "<<"-------------------"<<" "<<"Honor";
cout<<" "<<"Pendapatan"<cout<<" "<<"Jabatan "<<"Pendidikan "<<"Lembur"<<"
"<<"Pajak";
cout<<" "<<"Bersih"<cout<<"----------------------------------------------------------------------";
cout<<"-------"<for(a=1;a<=jk;a++)
{
if((g[a]==1)&&(p[a]==1))
{
cout<cout<cout<cout<pj[a]=0.1*(h+tj[0]+tp[0]+hl[a]);// pajak 10 %
pb[a]= (h+tj[0]+tp[0]+hl[a])-p[a];
//pendapatan bersih adalah pendapatan dikurangi pajak
tg=pb[a]+tg;
cout<cout<cout<cout<}
else if((g[a]==1)&&(p[a]==2))
{
cout<cout<cout<cout<pj[a]=0.1*(h+tj[0]+tp[1]+hl[a]);// pajak 10 %
pb[a]= (h+tj[0]+tp[1]+hl[a])-p[a];
//pendapatan bersih adalah pendapatan dikurangi pajak
tg=pb[a]+tg;
cout<cout<cout<cout<}
else if((g[a]==1)&&(p[a]==3))
{
cout<cout<cout<cout<pj[a]=0.1*(h+tj[0]+tp[2]+hl[a]);// pajak 10 %
pb[a]= (h+tj[0]+tp[2]+hl[a])-p[a];
//pendapatan bersih adalah pendapatan dikurangi pajak
tg=pb[a]+tg;
cout<cout<cout<cout<}
else if((g[a]==2)&&(p[a]==1))
{
cout<cout<cout<cout<pj[a]=0.1*(h+tj[1]+tp[0]+hl[a]);// pajak 10 %
pb[a]= (h+tj[1]+tp[0]+hl[a])-p[a];
//pendapatan bersih adalah pendapatan dikurangi pajak
tg=pb[a]+tg;
cout<cout<cout<cout<}
else if((g[a]==2)&&(p[a]==2))
{
cout<cout<cout<cout<pj[a]=0.1*(h+tj[1]+tp[1]+hl[a]);// pajak 10 %
pb[a]= (h+tj[1]+tp[1]+hl[a])-p[a];
//pendapatan bersih adalah pendapatan dikurangi pajak
tg=pb[a]+tg;
cout<cout<cout<cout<}
else if((g[a]==2)&&(p[a]==3))
{
cout<cout<cout<cout<pj[a]=0.1*(h+tj[1]+tp[2]+hl[a]);// pajak 10 %
pb[a]= (h+tj[1]+tp[2]+hl[a])-p[a];
//pendapatan bersih adalah pendapatan dikurangi pajak
tg=pb[a]+tg;
cout<cout<cout<cout<}
else if((g[a]==3)&&(p[a]==1))
{
cout<cout<cout<cout<pj[a]=0.1*(h+tj[2]+tp[0]+hl[a]);// pajak 10 %
pb[a]= (h+tj[2]+tp[0]+hl[a])-p[a];
//pendapatan bersih adalah pendapatan dikurangi pajak
tg=pb[a]+tg;
cout<cout<cout<cout<}
else if((g[a]==3)&&(p[a]==2))
{
cout<cout<cout<cout<pj[a]=0.1*(h+tj[2]+tp[1]+hl[a]);// pajak 10 %
pb[a]= (h+tj[2]+tp[1]+hl[a])-p[a];
//pendapatan bersih adalah pendapatan dikurangi pajak
tg=pb[a]+tg;
cout<cout<cout<cout<}
else if((g[a]==3)&&(p[a]==3))
{
cout<cout<cout<cout<pj[a]=0.1*(h+tj[2]+tp[2]+hl[a]);// pajak 10 %
pb[a]= (h+tj[2]+tp[2]+hl[a])-p[a];
//pendapatan bersih adalah pendapatan dikurangi pajak
tg=pb[a]+tg;
cout<cout<cout<cout<}
else
{
cout<<"Salah Kode";
}
}
cout<<"----------------------------------------------------------------------";
cout<<"-------"<cout<cout<cout<getch();
}

No comments:

Post a Comment