Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include<stdio.h>
- #include<conio.h>
- #include<iostream>
- using namespace std;
- main()
- {
- char nama[12],pndd[3];
- int gol,jmlker;
- double th,ht,tj,tp,hl;
- cout<<"program hitung honor karyawan kontrak pt.dingin damai"<<endl;
- //tampilan input
- cout<<"nama karyawan :";cin>>nama;
- cout<<"golongan :";cin>>gol;
- cout<<"pendidikan :";cin>>pndd;
- cout<<"jumlah jam kerja:";cin>>jmlker;
- //prosses
- ht=30000;
- if(gol=1)
- {
- tj=0.05*ht;
- }
- if(gol=2)
- {
- tj=0.1*ht;
- }
- else
- tj=0.15*ht;
- //tunjangan
- if(pndd=="SMU")
- {
- tp=0.025*ht;
- }
- else
- if(pndd=="D3")
- {
- tp=0.5*ht;
- }
- else
- {
- tp=0.075*ht;
- }
- hl=(jmlker-8)*2500;
- th=ht+tj+hl+tp;
- cout<<"Karyawan yang bernama : "<<nama<<endl;
- cout<<"honor tetap Rp. "<<ht<<endl;
- cout<<"tunjangan jabatan Rp. "<<tj<<endl;
- cout<<"tunjangan pendidikan Rp. "<<tp<<endl;
- cout<<"honor lembur Rp. "<<hl<<endl;
- cout<<"honor yang diterima: "<<th;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement