Home » » Program Hitung Gaji Karyawan Menggunakan C++

Program Hitung Gaji Karyawan Menggunakan C++




#include <iostream.h>
#include <conio.h>
#include <iomanip.h>
void main() {
   float lk, jhk, gp, gh, bonus, jg;
   cout<<"PROGRAM HITUNG GAJI"<<endl;
   cout<<"==================="<<endl;
   cout<<endl;
   cout<<"INPUT LAMA KERJA (TAHUN) = ";
   cin>>lk;
   if (lk <= 1) {
      gp = 1000000;
   }
   else {
      gp = 2000000;
   }

   cout<<"INPUT LAMA KERJA (BULAN) = ";
   cin>>jhk;
   gh = jhk * 25000;
   if (jhk > 25) {
     bonus = 0.2 * gp;
   }
   else {
     if (jhk >= 20) {
       bonus = 0.1 * gp;
     }
     else {
       bonus = 0;
     }
   }
   jg = gp + gh + bonus;
   cout<<endl;
   cout<<"GAJI POKOK               = Rp. "<<setprecision(7)<<gp<<endl;
   cout<<"GAJI HARIAN              = Rp. "<<setprecision(7)<<gh<<endl;
   cout<<"BONUS                    = Rp. "<<setprecision(7)<<bonus<<endl;
   cout<<"JUMLAH GAJI              = Rp. "<<setprecision(7)<<jg;

   cout<<endl;
   cout<<endl;
   cout<<endl;
   if (jhk > 20) {
     cout<<"        Anda Rajin         ";
   }
   else {
     cout<<"        Anda Malas";
   }

   getch();
}
Share this article :

0 comments:

Post a Comment

Welcome To Blogger

Followers

VISITOR

Free counters!
 
Support : © 2011. r0Ll1nK - All Rights Blogger. Hee :D