Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [22:09, 3/22/2019] عرفان كورنياوان: copy paste
- [22:09, 3/22/2019] عرفان كورنياوان: biar tak coba d tempat sya
- [22:09, 3/22/2019] +62 815-9827-986: #include<iostream>
- #include<windows.h>
- #include<string>
- #include<conio.h>
- #include<stdlib.h>
- using namespace std;
- int main()
- {
- int total_jam_kerja,A,B,C,D,upah_tanpa_lembur,upah_lembur,jam_lembur,upah_total;
- char nama[100], golongan, lanjut;
- cout<<"MENGHITUNG GAJI MINGGUAN KARYAWAN"<<endl;
- cout<<"==========================================\n";
- lembur : 3000;
- A = 4000;
- B = 5000;
- C = 6000;
- D = 7000;
- cout<<"==========================================\n";
- cout<<"GOLONGAN 'A' =Rp.4000"<<endl;
- cout<<"GOLONGAN 'B' =Rp.5000"<<endl;
- cout<<"GOLONGAN 'C' =Rp.6000"<<endl;
- cout<<"GOLONGAN 'D' =Rp.7000"<<endl;
- cout<<"=========================================\n";
- cout<<"MASUKAN ISI DATA KARYAWAN"<<endl;
- cout<<"=========================================\n";
- cout<<"MASUKAN NAMA KARYAWAN =";cin>>nama;
- cout<<"MASUKAN GOLONGAN =";cin>>golongan;
- cout<<endl;
- if(golongan == 'A' || golongan == 'a'){
- if (total_jam_kerja >= 48) {
- cout<<"========================================\n"<<endl;
- cout<<" KARYAWAN GOLONGAN 'A'\n"<<endl;
- cout<<"-----------------------------------------\n"<<endl;
- cout<<"NAMA KARYAWAN :"<<nama<<endl;
- cout<<"GOLONGAN KARYAWAN :"<<golongan<<endl;
- cout<<"MASUKAN JAM LEMBUR :";
- cin>>jam_lembur;
- cout<<"TOTAL JAM KERJA SEMINGGU : 48 jam "<<endl;
- upah_tanpa_lembur =A*48;
- upah_lembur=jam_lembur*3000;
- upah_total = upah_tanpa_lembur+upah_lembur;
- cout<<"UPAH TANPA LEMBUR ="<<upah_tanpa_lembur<<endl;
- cout<<"UPAH LEMBUR ="<<upah_lembur<<endl;
- cout<<"______________\n"<<endl;
- cout<<"TOTAL UPAH SELAMA SEMINGGU="<<upah_total<<endl;
- cout<<endl;
- }
- }else if (golongan == 'B' || golongan == 'b') {
- if(total_jam_kerja >= 48) {
- cout<<"========================================\n"<<endl;
- cout<<" KARYAWAN GOLONGAN 'B'\n"<<endl;
- cout<<"-----------------------------------------\n"<<endl;
- cout<<"NAMA KARYAWAN :"<<nama<<endl;
- cout<<"GOLONGAN KARYAWAN :"<<golongan<<endl;
- cout<<"MASUKAN JAM LEMBUR :";
- cin>>jam_lembur;
- cout<<"TOTAL JAM KERJA SEMINGGU : 48 jam "<<endl;
- upah_tanpa_lembur =B*48;
- upah_lembur=jam_lembur*3000;
- upah_total = upah_tanpa_lembur+upah_lembur;
- cout<<"UPAH TANPA LEMBUR ="<<upah_tanpa_lembur<<endl;
- cout<<"UPAH LEMBUR ="<<upah_lembur<<endl;
- cout<<"______________\n"<<endl;
- cout<<"TOTAL UPAH SELAMA SEMINGGU="<<upah_total<<endl;
- cout<<endl;
- }
- }
- else if (golongan == 'C' || golongan == 'c') {
- if(total_jam_kerja >= 48) {
- cout<<"========================================\n"<<endl;
- cout<<" KARYAWAN GOLONGAN 'C'\n"<<endl;
- cout<<"-----------------------------------------\n"<<endl;
- cout<<"NAMA KARYAWAN :"<<nama<<endl;
- cout<<"GOLONGAN KARYAWAN :"<<golongan<<endl;
- cout<<"MASUKAN JAM LEMBUR :";
- cin>>jam_lembur;
- cout<<"TOTAL JAM KERJA SEMINGGU : 48 jam "<<endl;
- upah_tanpa_lembur =C*48;
- upah_lembur=jam_lembur*3000;
- upah_total = upah_tanpa_lembur+upah_lembur;
- }
- } else {
- cout<<"GOLONGAN KARYAWAN TIDAK ADA";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement