#include <iostream.h>
#include <conio.h>
#include <stdio.h>
main ()
{
char nama [50],pendidikan[7];
long gol,jamker,lembur1,lembur2, tunjab, tunpen, gapok=300000, total;
cout<<"\tPROGRAM HITUNG GAJI KARYAWAN";
cout<<"\n============================================";
cout<<"\n\nNama Karyawan = ";gets(nama);
cout<<"Golongan Jabatan [1/2/3] = ";cin>>gol;
cout<<"Pendidikan [ SMA/D1/D3/S1 ] = ";cin>>pendidikan;
cout<<"Jumlah jam kerja = ";cin>>jamker;
if(gol==1)
{tunjab=0.05*gapok;}
else
if(gol==2)
{tunjab=0.1*gapok;}
else
{tunjab=0.15*gapok;}
if(strcmp(pendidikan,"SMA")==0||strcmp(pendidikan,"sma")==0)
{tunpen=0.025*gapok;}
else
if(strcmp(pendidikan,"D1")==0||strcmp(pendidikan,"d1")==0)
{tunpen=0.05*gapok;}
else
if(strcmp(pendidikan,"D3")==0)
{tunpen=0.3*gapok;}
lembur1=jamker-8;
if(lembur1>0)
{lembur2=lembur1*3500;}
else
{lembur2=0;}
total=gapok+tunjab+tunpen+lembur2;
cout<<endl;
cout<<"Karyawan yang bernama = "<<nama<<endl;
cout<<"Honor yang diterima "<<endl;
cout<<" Tunjangan jabatan Rp."<<tunjab<<endl;
cout<<" Tunjangan pendidikan Rp."<<tunpen<<endl;
cout<<" Honor Lembur Rp."<<lembur2<<endl;
cout<<" Total gaji _______________+"<<endl;
cout<<" Rp."<<total<<endl;
getche();
}
sikat_dah
0 komentar:
Posting Komentar