Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Online C++ Compiler.
  4. Code, Compile, Run and Debug C++ program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9.  
  10. #include<stdio.h>
  11. #include<conio.h>
  12. #include<iostream>
  13. using namespace std;
  14. main()
  15. {
  16. char nama[12],pndd[3];
  17. int gol,jmlker;
  18. double th,ht,tj,tp,hl;
  19. cout<<"program hitung honor karyawan kontrak pt.dingin damai"<<endl;
  20. //tampilan input
  21.  
  22. cout<<"nama karyawan :";cin>>nama;
  23. cout<<"golongan :";cin>>gol;
  24. cout<<"pendidikan :";cin>>pndd;
  25. cout<<"jumlah jam kerja:";cin>>jmlker;
  26.  
  27. //prosses
  28. ht=30000;
  29. if(gol=1)
  30. {
  31. tj=0.05*ht;
  32. }
  33. if(gol=2)
  34. {
  35. tj=0.1*ht;
  36. }
  37. else
  38. tj=0.15*ht;
  39.  
  40. //tunjangan
  41. if(pndd=="SMU")
  42. {
  43. tp=0.025*ht;
  44. }
  45. else
  46. if(pndd=="D3")
  47. {
  48. tp=0.5*ht;
  49. }
  50. else
  51. {
  52. tp=0.075*ht;
  53. }
  54.  
  55.  
  56. hl=(jmlker-8)*2500;
  57.  
  58.  
  59. th=ht+tj+hl+tp;
  60.  
  61. cout<<"Karyawan yang bernama : "<<nama<<endl;
  62. cout<<"honor tetap Rp. "<<ht<<endl;
  63. cout<<"tunjangan jabatan Rp. "<<tj<<endl;
  64. cout<<"tunjangan pendidikan Rp. "<<tp<<endl;
  65. cout<<"honor lembur Rp. "<<hl<<endl;
  66. cout<<"honor yang diterima: "<<th;
  67. getch();
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement