Sistem Gaji Pada C++
Gaji
pada kali ini saya akan membuat program gaji karyawan.
berikut conoth program
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
int main ()
{
awal:
system("cls");
cout<<"Program menghitung gaji"<<endl;
cout<<"========================"<<endl;
char yt;
int b;
int c;
int d;
int e;
char a[50];
cout<<endl;
cout<<"aplikasi menghitung gaji"<<endl;
cout<<"========================"<<endl;
cout<<"Nama Karyawan :";
cin>>a;
cout<<endl;
cout<<"Masukkan gaji pokok :";
cin>>b;
cout<<endl;
cout<<"Masukkan gaji tunjangan :";
cin>>c;
cout<<endl;
d= c+b;
e= d*0.2;
cout<<"========================="<<endl;
cout<<"jumlah total gaji kotor :"<<d<<endl;
cout<<"PPh 20% :"<<e<<endl;
cout<<"Gaji bersih setelah Potong PPh :"<<d-e<<endl;
cout<<"=================================="<<endl;
cout<<endl;
cout<<endl;
cout<<"ingin mengulangi ? (Y/N)"<<endl;
cin>>yt;
if(yt=='Y' || yt=='y'){
goto awal;
}
if(yt=='N' ||yt=='n'){
goto selesai;
}
selesai:
system("cls");
cout<<"==============================="<<endl;
cout<<"+++++++++Terima Kasih++++++++++"<<endl;
cout<<"==============================="<<endl;
return 0;
}
pada kali ini saya akan membuat program gaji karyawan.
berikut conoth program
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
int main ()
{
awal:
system("cls");
cout<<"Program menghitung gaji"<<endl;
cout<<"========================"<<endl;
char yt;
int b;
int c;
int d;
int e;
char a[50];
cout<<endl;
cout<<"aplikasi menghitung gaji"<<endl;
cout<<"========================"<<endl;
cout<<"Nama Karyawan :";
cin>>a;
cout<<endl;
cout<<"Masukkan gaji pokok :";
cin>>b;
cout<<endl;
cout<<"Masukkan gaji tunjangan :";
cin>>c;
cout<<endl;
d= c+b;
e= d*0.2;
cout<<"========================="<<endl;
cout<<"jumlah total gaji kotor :"<<d<<endl;
cout<<"PPh 20% :"<<e<<endl;
cout<<"Gaji bersih setelah Potong PPh :"<<d-e<<endl;
cout<<"=================================="<<endl;
cout<<endl;
cout<<endl;
cout<<"ingin mengulangi ? (Y/N)"<<endl;
cin>>yt;
if(yt=='Y' || yt=='y'){
goto awal;
}
if(yt=='N' ||yt=='n'){
goto selesai;
}
selesai:
system("cls");
cout<<"==============================="<<endl;
cout<<"+++++++++Terima Kasih++++++++++"<<endl;
cout<<"==============================="<<endl;
return 0;
}
0 Response to "Sistem Gaji Pada C++"
Post a Comment