Selasa, 06 November 2012

Source Code Sederhana Menghitung Gaji Karyawan dengan C++

Halo sahabat blogger IT, ini adalah script C++ untuk menghitung gaji karyawan. untuk penjelasan atau study kasus akan saya jelaskan lain waktu, tapi apabila anda mengetahui dasar nya insya allah anda sudah mengerti melihat script tersebut, saya akan menjelaskan banyak tentang pemrograman dasar C++, tapi mungkin tidak sekarang, karena masih belum sempat menulis. semoga bermanfaat!! untuk para master, lewat saja!! hehe
(terima kasih untuk mas Dian sudah mengajak saya menulis disini)

DASAR PEMROGRAMAN C++
===============================
Sistem Penggajian Karyawan
===============================
#include<stdio.h>
#include<iostream.h>
#include<string.h>
#include<conio.h>

void karyawan()
{
float gol;
float gapok;
float status;
float tunjangan_gol;
float tunjangan_pend;
float total;
float lembur;
float tot_lembur;
char nama [20];
char nama_k [20];

{
cout<<"============================================================================="<<endl;
cout<<"            PEMBAYARAN GAJI KARYAWAN PT. DINGIN DAMAI"<<endl;
cout<<"============================================================================="<<endl;
cout<<""<<endl;
cout<<"NAMA KARYAWAN            :";
gets(nama);
cout<<"GOLONGAN (1-3)            :";
cin>>gol;
cout<<""<<endl;
cout<<"KODE PENDIDIKAN    "<<endl;
cout<<"(1. SMA || 2. D3 || 3. S1)    :";
cin>>status;
cout<<""<<endl;
cout<<"JAM KERJA (Normal 160 JAM)    :";
cin>>lembur;

if ((gol==1) && (status==1))
{
gapok=300000;
tunjangan_gol=(0.05*gapok);
tunjangan_pend=(0.02*gapok);
tot_lembur=(lembur-160)*2500;
total=(gapok+tunjangan_gol+tunjangan_pend)+tot_lembur;
cout<<"============================================================================="<<endl;
cout<<"GAJI POKOK            =Rp. "<<gapok<<endl;
cout<<"TUNJANGAN            =Rp. "<<tunjangan_gol+tunjangan_pend<<endl;
cout<<"UPAH LEMBUR             =Rp. "<<tot_lembur<<endl;
cout<<""<<endl;
cout<<"-----------------------------------------------------------------------------"<<endl;
cout<<"TOTAL GAJI            =Rp. "<<total<<endl;
cout<<"============================================================================="<<endl;}
else if ((gol==1) && (status==2))
{
gapok=300000;
tunjangan_gol=(0.05*gapok);
tunjangan_pend=(0.05*gapok);
tot_lembur=(lembur-160)*2500;
total=(gapok+tunjangan_gol+tunjangan_pend);
cout<<"============================================================================="<<endl;
cout<<"GAJI POKOK            =Rp. "<<gapok<<endl;
cout<<"TUNJANGAN            =Rp. "<<tunjangan_gol+tunjangan_pend<<endl;
cout<<"UPAH LEMBUR             =Rp. "<<tot_lembur<<endl;
cout<<""<<endl;
cout<<"-----------------------------------------------------------------------------"<<endl;
cout<<"TOTAL GAJI            =Rp. "<<total<<endl;
cout<<"============================================================================="<<endl;}
else if ((gol==1) && (status==3))
{
gapok=300000;
tunjangan_gol=(0.05*gapok);
tunjangan_pend=(0.07*gapok);
tot_lembur=(lembur-160)*2500;
total=(gapok+tunjangan_gol+tunjangan_pend);
cout<<"============================================================================="<<endl;
cout<<"GAJI POKOK            =Rp. "<<gapok<<endl;
cout<<"TUNJANGAN            =Rp. "<<tunjangan_gol+tunjangan_pend<<endl;
cout<<"UPAH LEMBUR             =Rp. "<<tot_lembur<<endl;
cout<<""<<endl;
cout<<"-----------------------------------------------------------------------------"<<endl;
cout<<"TOTAL GAJI            =Rp. "<<total<<endl;
cout<<"============================================================================="<<endl;}
else if ((gol==2) && (status==1))
{
gapok=300000;
tunjangan_gol=(0.10*gapok);
tunjangan_pend=(0.02*gapok);
tot_lembur=(lembur-160)*2500;
total=gapok+(tunjangan_gol+tunjangan_pend);
cout<<"============================================================================="<<endl;
cout<<"GAJI POKOK            =Rp. "<<gapok<<endl;
cout<<"TUNJANGAN            =Rp. "<<tunjangan_gol+tunjangan_pend<<endl;
cout<<"UPAH LEMBUR             =Rp. "<<tot_lembur<<endl;
cout<<""<<endl;
cout<<"-----------------------------------------------------------------------------"<<endl;
cout<<"TOTAL GAJI            =Rp. "<<total<<endl;
cout<<"============================================================================="<<endl;}
else if ((gol==2) && (status==2))
{
gapok=300000;
tunjangan_gol=(0.10*gapok);
tunjangan_pend=(0.05*gapok);
tot_lembur=(lembur-160)*2500;
total=gapok+(tunjangan_gol+tunjangan_pend);
cout<<"============================================================================="<<endl;
cout<<"GAJI POKOK            =Rp. "<<gapok<<endl;
cout<<"TUNJANGAN            =Rp. "<<tunjangan_gol+tunjangan_pend<<endl;
cout<<"UPAH LEMBUR             =Rp. "<<tot_lembur<<endl;
cout<<""<<endl;
cout<<"-----------------------------------------------------------------------------"<<endl;
cout<<"TOTAL GAJI            =Rp. "<<total<<endl;
cout<<"============================================================================="<<endl;}
else if ((gol==2) && (status==3))
{
gapok=300000;
tunjangan_gol=(0.10*gapok);
tunjangan_pend=(0.07*gapok);
tot_lembur=(lembur-160)*2500;
total=gapok+(tunjangan_gol+tunjangan_pend);
cout<<"============================================================================="<<endl;
cout<<"GAJI POKOK            =Rp. "<<gapok<<endl;
cout<<"TUNJANGAN            =Rp. "<<tunjangan_gol+tunjangan_pend<<endl;
cout<<"UPAH LEMBUR             =Rp. "<<tot_lembur<<endl;
cout<<""<<endl;
cout<<"-----------------------------------------------------------------------------"<<endl;
cout<<"TOTAL GAJI            =Rp. "<<total<<endl;
cout<<"============================================================================="<<endl;
}
else if ((gol==3) && (status==1))
{
gapok=300000;
tunjangan_gol=(0.15*gapok);
tunjangan_pend=(0.02*gapok);
tot_lembur=(lembur-160)*2500;
total=gapok+(tunjangan_gol+tunjangan_pend);
cout<<"============================================================================="<<endl;
cout<<"GAJI POKOK            =Rp. "<<gapok<<endl;
cout<<"TUNJANGAN            =Rp. "<<tunjangan_gol+tunjangan_pend<<endl;
cout<<"UPAH LEMBUR             =Rp. "<<tot_lembur<<endl;
cout<<""<<endl;
cout<<"-----------------------------------------------------------------------------"<<endl;
cout<<"TOTAL GAJI            =Rp. "<<total<<endl;
cout<<"============================================================================="<<endl;
}
else if ((gol==3) && (status==2))
{
gapok=300000;
tunjangan_gol=(0.15*gapok);
tunjangan_pend=(0.05*gapok);
tot_lembur=(lembur-160)*2500;
total=gapok+(tunjangan_gol+tunjangan_pend);
cout<<"============================================================================="<<endl;
cout<<"GAJI POKOK            =Rp. "<<gapok<<endl;
cout<<"TUNJANGAN            =Rp. "<<tunjangan_gol+tunjangan_pend<<endl;
cout<<"UPAH LEMBUR             =Rp. "<<tot_lembur<<endl;
cout<<""<<endl;
cout<<"-----------------------------------------------------------------------------"<<endl;
cout<<"TOTAL GAJI            =Rp. "<<total<<endl;
cout<<"============================================================================="<<endl;}
else if ((gol==3) && (status==3))
{
gapok=300000;
tunjangan_gol=(0.15*gapok);
tunjangan_pend=(0.07*gapok);
tot_lembur=(lembur-160)*2500;
total=gapok+(tunjangan_gol+tunjangan_pend);
cout<<"============================================================================="<<endl;
cout<<"GAJI POKOK            =Rp. "<<gapok<<endl;
cout<<"TUNJANGAN            =Rp. "<<tunjangan_gol+tunjangan_pend<<endl;
cout<<"UPAH LEMBUR             =Rp. "<<tot_lembur<<endl;
cout<<""<<endl;
cout<<"-----------------------------------------------------------------------------"<<endl;
cout<<"TOTAL GAJI            =Rp. "<<total<<endl;
cout<<"============================================================================="<<endl;
}


else
{
cout<<"SALAH"<<endl;
}
cout<<""<<endl;
cout<<"                TERIMA KASIH"<<endl;
cout<<"============================================================================="<<endl;
}}
void main()
{
clrscr();
karyawan();
getch();
}

20 komentar:

  1. gan kok komentar saya di hapus ?
    sudah memakai kata kata yang benar loh kalu tidak bisa jawab ya sudah tinggal bilang

    BalasHapus
    Balasan
    1. IEEE Project Domain management in software engineering is distinct from traditional project deveopment in that software projects have a unique lifecycle process that requires multiple rounds of testing, updating, and faculty feedback. A IEEE Domain project Final Year Projects for CSE system development life cycle is essentially a phased project model that defines the organizational constraints of a large-scale systems project. The methods used in a IEEE DOmain Project systems development life cycle strategy Project Centers in Chennai For CSE provide clearly defined phases of work to plan, design, test, deploy, and maintain information systems.


      This is enough for me. I want to write software that anyone can use, and virtually everyone who has an internet connected device with a screen can use apps written in JavaScript. JavaScript Training in Chennai JavaScript was used for little more than mouse hover animations and little calculations to make static websites feel more interactive. Let’s assume 90% of all websites using JavaScript use it in a trivial way. That still leaves 150 million substantial JavaScript Training in Chennai JavaScript applications.

      Hapus
  2. makasih untuk informasinya, sangat membantu
    Tempat Tidur Anak

    BalasHapus
  3. Sukses selalu dan terimakasih informasinya
    Meja Belajar Anak Jati

    BalasHapus
  4. Semoga sukses selalu, terimakasih infonya,,,
    Lemari Pakaian Bayi

    BalasHapus
  5. Studies demonstrate that around 56% of all understudies think about their homework as the most essential wellspring of worry in their life. It is no big surprise then these understudies continually consider 'who can get my work done ' in UK. Luckily for them, we give master homework help at truly sensible costs. Assignment Writing Help

    BalasHapus

Bagi teman - teman yang menemukan link, yang tidak bisa di download, segera laporkan ya... Supaya bisa di perbaiki.
Laporkan link yang tidak bisa di download ke nomor : 085736497749
Dengan format : Nama Anda - Lapor - Link - Rusak
Contoh : Dian - Lapor - http://materi-it.unpkediri.ac.id/p/blog-page_2.html - Rusak

Terimakasih selamat berkunjung kembali dan semoga bermanfaat.