#include <iostream.h>
#include <conio.h>
#include <stdio.h>
main ()
{
char nama [50], golongan, pendidikan, lanjut, ulangi;
long lembur, tunjab, tunpen, gapok, gatot;
int jamker;
clrscr();
cout<<"\tPROGRAM HITUNG GAJI KARYAWAN";
cout<<"\n============================================";
cout<<"\n\nNama Karyawan = ";gets(nama);
cout<<"Golongan Jabatan [1/2/3] = ";cin>>golongan;
cout<<"Pendidikan [ (1)SMA/(2)D1/(3)D3/(4)S1 = ";cin>>pendidikan;
cout<<"Jumlah jam kerja = ";cin>>jamker;
gapok = 300000;
cout<<"\nKaryawan Yang Bernama "<<nama;
switch (golongan)
{
case '1':
tunjab = gapok*0.05;
break;
case '2':
tunjab = gapok*0.1;
break;
case '3':
tunjab = gapok*0.15;
break;
default:
tunjab = 0;
}
switch (pendidikan)
{
case '1':
tunpen = gapok*0.025;
break;
case '2':
tunpen = gapok*0.05;
break;
case '3':
tunpen = gapok*0.2;
break;
case '4':
tunpen = gapok*0.3;
break;
default:
tunpen = 0;
}
if (jamker < 8 || jamker > 24)
{
lembur = 0;
}
else
lembur = (jamker - 8)*3500;
gatot = tunjab + tunpen + lembur + gapok;
cout<<"\n\nHonor Yang Diterima";
cout<<"\n\tTunjangan Jabatan Rp. "<<tunjab;
cout<<"\n\tTunjangan Pendidikan Rp. "<<tunpen;
cout<<"\n\tHonor Lembur Rp. "<<lembur;
cout<<"\n\t --------------- +";
cout<<"\n\tGaji Total Rp. "<<gatot;
getch();
}
hasil RUNnya coba sendiri y n kalau mw download klik disini
Jumat, 22 April 2011
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar