#include <conio>
#include <iostream>
int gapok; char status;
void input(){
cout<<"masukkan gaji pokok="; cin>>gapok;
cout<<"masukkan status (n/t)="; cin>>status;}
double tunjangan_keluarga(char status, int gapok){
if (status='n')
return(0.25*gapok);
else
return(0);}
double pajak(gapok){
return(0.05*gapok);}
main(){
input();
double total_gaji;
total_gaji=gapok+tunjangan_keluarga(status,gapok)-pajak(gapok);
cout<<total_gaji;
getch();
}
#include <iostream>
int gapok; char status;
void input(){
cout<<"masukkan gaji pokok="; cin>>gapok;
cout<<"masukkan status (n/t)="; cin>>status;}
double tunjangan_keluarga(char status, int gapok){
if (status='n')
return(0.25*gapok);
else
return(0);}
double pajak(gapok){
return(0.05*gapok);}
main(){
input();
double total_gaji;
total_gaji=gapok+tunjangan_keluarga(status,gapok)-pajak(gapok);
cout<<total_gaji;
getch();
}
Post a Comment