Fungsi Void dengan C++

Tuesday, March 29, 2011 7:41 AM by Computer and Programming
#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();
}

0 Response to "Fungsi Void dengan C++"

Post a Comment