1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#include <iostream>
#include <iomanip>
using namespace std;
\axes, CPP, EI, UD;
void DisplayPay (int OTPay, double Pay, const double HOURLYPAY, double OT, double DTime, double NetPay);
void DisplayDeductions(double Taxes, double CPP, double EI, double UD, double Money, double NetPay);
int main()
{
int hours=0;
char repeat = 'y';
//user instructions
cout<<"This program will calculate your pay based on how many hours youhave worked. This program will show your Gross Pay (indicating normal & overtime quantities), the amounts going to taxes, cpp, uic, union and the net pay for the week."<<endl<<endl;
do
{
cout<<"Please enter the number of hours you have worked: ";
cin>>hours;
void DisplayPay (int hours, double RegPay, double OverTPay, double Pay, const double HOURLYPAY, double OT, double DTime);
void DisplayDeductions(double &Taxes, double &CPP, double &EI, double &UD, double &Money, do
}while (repea
}
else if(45<hours)
{
Pay=(HOURLYPAY*40);
DTime= (hours-45);
OverTPay=(5*15.75)+(DTime*21.);
NetPay=(DTime*21)+(5*15.75)+(40*HOURLYPAY);
}
}
|