- Back to Home »
- Program »
- Program Mencari Upah Mingguan Karyawan
Posted by : Unknown
Kamis, 19 April 2012
Berikut ini adalah program untuk mencari upah mingguan karyawan:
#include <cstdlib>
#include <conio.h>
#include <iostream>
using namespace std;
int main (void)
{
cout<<"*-------------------------------------*\n";
cout<<"Program Mencari Upah Mingguan Karyawan\n";
cout<<"*-------------------------------------*\n";
int jjk,jamlembur,upahtotal,upahkerjanormal,jamkerjanormal;
char nama[50],gol;
jamkerjanormal=48*1;
cout<<"Nama : ";cin>>nama;
cout<<"Jumlah Jam Kerja : ";cin>>jjk;
cout<<"Golongan : ";cin>>gol;
system("CLS");
if (gol=='a' || gol=='A')
{
upahkerjanormal=jamkerjanormal*6000;
jamlembur=(jjk-jamkerjanormal)*3000;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Karyawan Paruh Waktu"<<endl;
}
else
if (gol=='b' || gol=='B')
{
upahkerjanormal=jamkerjanormal*7000;
jamlembur=(jjk-jamkerjanormal)*3000;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Karyawan Kontrak / Crew"<<endl;
}
else
if (gol=='c' || gol=='C')
{
upahkerjanormal=jamkerjanormal*8000;
jamlembur=(jjk-jamkerjanormal)*3000;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Koordinator / Management Trainee"<<endl;
}
else
if (gol=='d' || gol=='D')
{
upahkerjanormal=jamkerjanormal*10000;
jamlembur=(jjk-jamkerjanormal)*3000;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Supervisor"<<endl;
}
else
{
upahkerjanormal=jamkerjanormal*0;
jamlembur=(jjk-jamkerjanormal)*0;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Golongan Tidak Terdaftar"<<endl;
}
cout<<"Nama : "<<nama<<endl;
cout<<"Upah : "<<upahtotal<<endl;
system ("PAUSE");
}
#include <conio.h>
#include <iostream>
using namespace std;
int main (void)
{
cout<<"*-------------------------------------*\n";
cout<<"Program Mencari Upah Mingguan Karyawan\n";
cout<<"*-------------------------------------*\n";
int jjk,jamlembur,upahtotal,upahkerjanormal,jamkerjanormal;
char nama[50],gol;
jamkerjanormal=48*1;
cout<<"Nama : ";cin>>nama;
cout<<"Jumlah Jam Kerja : ";cin>>jjk;
cout<<"Golongan : ";cin>>gol;
system("CLS");
if (gol=='a' || gol=='A')
{
upahkerjanormal=jamkerjanormal*6000;
jamlembur=(jjk-jamkerjanormal)*3000;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Karyawan Paruh Waktu"<<endl;
}
else
if (gol=='b' || gol=='B')
{
upahkerjanormal=jamkerjanormal*7000;
jamlembur=(jjk-jamkerjanormal)*3000;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Karyawan Kontrak / Crew"<<endl;
}
else
if (gol=='c' || gol=='C')
{
upahkerjanormal=jamkerjanormal*8000;
jamlembur=(jjk-jamkerjanormal)*3000;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Koordinator / Management Trainee"<<endl;
}
else
if (gol=='d' || gol=='D')
{
upahkerjanormal=jamkerjanormal*10000;
jamlembur=(jjk-jamkerjanormal)*3000;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Supervisor"<<endl;
}
else
{
upahkerjanormal=jamkerjanormal*0;
jamlembur=(jjk-jamkerjanormal)*0;
upahtotal=upahkerjanormal+jamlembur;
cout<<"Golongan Tidak Terdaftar"<<endl;
}
cout<<"Nama : "<<nama<<endl;
cout<<"Upah : "<<upahtotal<<endl;
system ("PAUSE");
}
Posting Komentar