Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- using namespace std;
- main()
- {
- int a, b, toga, lagi;
- char golongan[3] = {'1','2','3'} ,*ket[3], nama[5][20];
- long hotap[3], jumkar[3], jamker[3], tunja[3];
- long holem[3], penber[3];
- double pajak[3], pentor[3];
- atas:
- system("cls");
- cout<<"Program Hitung Honor Karyawan Kontrak"<<endl;
- cout<<"PT. BONAFIT"<<endl;
- cout<<endl;
- cout<<"Masukkan Jumlah Karyawan : ";cin>>a;
- jumkar[a] = 0;
- if (a <= 0)
- {
- cout<<endl<<"\t\tJumlah Karyawan Tidak Boleh Null";
- goto bawah;
- }
- else
- {
- for(b = 1 ; b <= a; ++b)
- {
- cout<<"Karyawan Ke - "<<b<<endl;
- cout<<"Nama Karyawan : ";cin>>(nama[b]);
- cout<<"Jenis Golongan [1/2/3] : ";cin>>golongan[b];
- cout<<"Jumlah Jam Kerja : ";cin>>jamker[b];
- cout<<endl;
- hotap[a]=700000;
- if (golongan[b] == '1' || golongan[b] == '1')
- {
- ket[b] = "Golongan 1";
- tunja[b] = hotap[a] * 0.05;
- }
- else if (golongan[b] == '2' || golongan[b] == '2')
- {
- ket[b] = "Golongan 2";
- tunja[b] = hotap[a] * 0.1;
- }
- else if (golongan[b] == '3' || golongan[b] == '3')
- {
- ket[b] = "Golongan 3";
- tunja[b] = hotap[a] * 0.15;
- }
- else
- {
- cout<<"Anda Salah Masukan Kode Jenis Golongan."<<endl;
- tunja[b] = 0;
- }
- holem[b] = 2500*(jamker[b] - 240);
- pentor[b] = hotap[b] + tunja[b] + holem[b];
- penber[b] = pentor[b] - pajak[b];
- penber[a] = pentor[b] - pajak[b];
- pajak[b] = pentor[b] * 0.1;
- }
- }
- cout<<endl;
- cout<<"\t\t\tPT. BONAFIT"<<endl;
- cout<<endl;
- cout<<"------------------------------------------------------------------------"<<endl;
- cout<<" No. Nama Tunjangan\t Honor Pajak Pendapatan"<<endl;
- cout<<" Karyawan Jabatan\t Lembur Bersih"<<endl;
- cout<<"------------------------------------------------------------------------"<<endl;
- for (b = 1; b <= a; ++b)
- {
- cout<<" "<<b<<"\t"<<nama[b]<<" "<<tunja[b];
- cout<<" "<<holem[b]<<" "<<pajak[b]<<" "<<penber[b]<<endl;
- }
- cout<<"------------------------------------------------------------------------"<<endl;
- toga = penber[b] + penber[a];
- cout<<"\t\t Total Gaji Yang Dikeluarkan Rp "<<toga;
- cout<<endl;
- cout<<endl<<"\tCek Lagi? [Y/T] = ";
- lagi = getche();
- if (lagi == 'Y' || lagi == 'y')
- goto atas;
- else
- cout<<endl<<"\t\tTerima Kasih"<<endl;
- bawah:
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement