#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int jamkerja,lembur,jamtanpalembur,upahlembur;
char nama[20],golongan;
float upahkes,upah;
cout<<"\nNama Karyawan : ";
cin>>nama;
cout<<"Golongan [A/B/C/D] : ";
cin>>golongan;
cout<<"Jumlah Jam Kerja : ";
cin>>jamkerja;
cout<<endl;
if (jamkerja>48)
{
lembur=jamkerja-48;
jamtanpalembur=48;
}
else
{
lembur=0;
jamtanpalembur=jamkerja;
}
switch(golongan)
{
case'A':
upah=jamtanpalembur*7000;
break;
case'B':
upah=jamtanpalembur*8000;
break;
case'C':
upah=jamtanpalembur*9000;
break;
case'D':
upah=jamtanpalembur*10000;
break;
}
upahlembur=lembur*5000;
upahkes=upah+upahlembur;
cout<<"====================================";
cout<<"\n Hasil Penghitungan Gaji Karyawan";
cout<<"\n====================================";
cout<<endl;
cout<<"Nama Karyawan : "<<nama<<endl;
cout<<"Gaji keseluruhan : Rp"<<upahkes<<endl;
system ("pause");
return 0;
}
ADS HERE !!!