Advertisement
irfankooor

c++

Mar 22nd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1. [22:09, 3/22/2019] عرفان كورنياوان: copy paste
  2. [22:09, 3/22/2019] عرفان كورنياوان: biar tak coba d tempat sya
  3. [22:09, 3/22/2019] +62 815-9827-986: #include<iostream>
  4. #include<windows.h>
  5. #include<string>
  6. #include<conio.h>
  7. #include<stdlib.h>
  8.  
  9. using namespace std;
  10.  
  11. int main()
  12.  
  13. {
  14. int total_jam_kerja,A,B,C,D,upah_tanpa_lembur,upah_lembur,jam_lembur,upah_total;
  15. char nama[100], golongan, lanjut;
  16.  
  17. cout<<"MENGHITUNG GAJI MINGGUAN KARYAWAN"<<endl;
  18. cout<<"==========================================\n";
  19. lembur : 3000;
  20. A = 4000;
  21. B = 5000;
  22. C = 6000;
  23. D = 7000;
  24. cout<<"==========================================\n";
  25.  
  26. cout<<"GOLONGAN 'A' =Rp.4000"<<endl;
  27. cout<<"GOLONGAN 'B' =Rp.5000"<<endl;
  28. cout<<"GOLONGAN 'C' =Rp.6000"<<endl;
  29. cout<<"GOLONGAN 'D' =Rp.7000"<<endl;
  30. cout<<"=========================================\n";
  31.  
  32. cout<<"MASUKAN ISI DATA KARYAWAN"<<endl;
  33. cout<<"=========================================\n";
  34. cout<<"MASUKAN NAMA KARYAWAN =";cin>>nama;
  35. cout<<"MASUKAN GOLONGAN =";cin>>golongan;
  36.  
  37. cout<<endl;
  38.  
  39. if(golongan == 'A' || golongan == 'a'){
  40.  
  41. if (total_jam_kerja >= 48) {
  42. cout<<"========================================\n"<<endl;
  43. cout<<" KARYAWAN GOLONGAN 'A'\n"<<endl;
  44. cout<<"-----------------------------------------\n"<<endl;
  45.  
  46. cout<<"NAMA KARYAWAN :"<<nama<<endl;
  47. cout<<"GOLONGAN KARYAWAN :"<<golongan<<endl;
  48. cout<<"MASUKAN JAM LEMBUR :";
  49. cin>>jam_lembur;
  50. cout<<"TOTAL JAM KERJA SEMINGGU : 48 jam "<<endl;
  51.  
  52. upah_tanpa_lembur =A*48;
  53. upah_lembur=jam_lembur*3000;
  54. upah_total = upah_tanpa_lembur+upah_lembur;
  55.  
  56. cout<<"UPAH TANPA LEMBUR ="<<upah_tanpa_lembur<<endl;
  57. cout<<"UPAH LEMBUR ="<<upah_lembur<<endl;
  58. cout<<"______________\n"<<endl;
  59. cout<<"TOTAL UPAH SELAMA SEMINGGU="<<upah_total<<endl;
  60. cout<<endl;
  61. }
  62.  
  63. }else if (golongan == 'B' || golongan == 'b') {
  64.  
  65. if(total_jam_kerja >= 48) {
  66. cout<<"========================================\n"<<endl;
  67. cout<<" KARYAWAN GOLONGAN 'B'\n"<<endl;
  68. cout<<"-----------------------------------------\n"<<endl;
  69.  
  70. cout<<"NAMA KARYAWAN :"<<nama<<endl;
  71. cout<<"GOLONGAN KARYAWAN :"<<golongan<<endl;
  72. cout<<"MASUKAN JAM LEMBUR :";
  73. cin>>jam_lembur;
  74. cout<<"TOTAL JAM KERJA SEMINGGU : 48 jam "<<endl;
  75.  
  76. upah_tanpa_lembur =B*48;
  77. upah_lembur=jam_lembur*3000;
  78. upah_total = upah_tanpa_lembur+upah_lembur;
  79.  
  80. cout<<"UPAH TANPA LEMBUR ="<<upah_tanpa_lembur<<endl;
  81. cout<<"UPAH LEMBUR ="<<upah_lembur<<endl;
  82. cout<<"______________\n"<<endl;
  83. cout<<"TOTAL UPAH SELAMA SEMINGGU="<<upah_total<<endl;
  84. cout<<endl;
  85. }
  86. }
  87. else if (golongan == 'C' || golongan == 'c') {
  88.  
  89. if(total_jam_kerja >= 48) {
  90. cout<<"========================================\n"<<endl;
  91. cout<<" KARYAWAN GOLONGAN 'C'\n"<<endl;
  92. cout<<"-----------------------------------------\n"<<endl;
  93.  
  94. cout<<"NAMA KARYAWAN :"<<nama<<endl;
  95. cout<<"GOLONGAN KARYAWAN :"<<golongan<<endl;
  96. cout<<"MASUKAN JAM LEMBUR :";
  97. cin>>jam_lembur;
  98. cout<<"TOTAL JAM KERJA SEMINGGU : 48 jam "<<endl;
  99.  
  100. upah_tanpa_lembur =C*48;
  101. upah_lembur=jam_lembur*3000;
  102. upah_total = upah_tanpa_lembur+upah_lembur;
  103. }
  104.  
  105. } else {
  106. cout<<"GOLONGAN KARYAWAN TIDAK ADA";
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement