Thursday, 15 December 2011

hitung gaji bersih 3


#include<conio.h>
#include<stdio.h>
#include<iostream.h>
void main()
{
long int bonus,gapok,tunj,asuransi,gaber;
char gol;
clrscr();
cout<<"\n\n    PERHITUNGAN GAJI BERSIH\n\n\n";
cout<<"Gaji Pokok        = Rp. 1.000.000,-"<<endl;
cout<<"Tunjangan Pegawai = 2 % dari gaji pokok"<<endl;
cout<<"Asuransi          = 3 % dari Gaji pokok"<<endl<<endl;
cout<<"Masukkan jenis golongan [A/B/C/D] =";cin>>gol;
gapok=1000000;
if(gol=='A'|| gol=='a')
bonus=0.1*gapok;
else if (gol=='B'|| gol=='b')
bonus=0.05*gapok;
else
bonus=0;
tunj=0.02*gapok;
asuransi=0.03*gapok;
gaber=(gapok+tunj+bonus)-asuransi;
cout<<endl<<endl;
cout<<"Gaji Pokok    = 1000000\n";
cout<<"Tunjangan     = "<<tunj<<endl;
cout<<"Bonus         = "<<bonus<<endl;
cout<<"Asuransi      = "<<asuransi<<endl;
cout<<"Gaji Bersih   = "<<gaber;
getch();
}

No comments:

Post a Comment