Could someone Please help me figure out why my calculations are incorrect. I have been working very hard on this and am really confused. I do not see what I am doing wrong or how to fix it. I do not get any error messages. However, when I run the program, the calculations are all incorrect. Please help me out with this.

Code:#include <iostream> #include <iomanip> using namespace std; double Gross(double); char mStatusDetermination(); double FederalTax(char, double); double StateTax(double); double LocalTax(double); double MedInsuranceDeductions(char); double TakeHomePay(double, double, double); void DisplayPayrollReport(double, double, double,double, double, double, double); int main(){ char ans; char MaritalStatus; double GrossPay, NetPay; double HourlyRate; double federalDeductions, stateDeductions, localDeductions; double TotalDeductions, ExtraDeductions; cout << " Welcome To The Payroll Calculation Program. \n"; cout << "--------------------------------------------------------------------------------\n"; cout << endl; do { cout << "The rate per hour is: "; cin >> HourlyRate; cout << endl; GrossPay = Gross(HourlyRate); MaritalStatus = mStatusDetermination(); federalDeductions = FederalTax(MaritalStatus, GrossPay); stateDeductions = StateTax(GrossPay); localDeductions = LocalTax(GrossPay); TotalDeductions = (federalDeductions + stateDeductions + localDeductions); ExtraDeductions = MedInsuranceDeductions(MaritalStatus); NetPay = TakeHomePay(GrossPay,TotalDeductions, ExtraDeductions); DisplayPayrollReport(GrossPay, HourlyRate, federalDeductions, stateDeductions, localDeductions, ExtraDeductions, NetPay); cout << "\nWould you like to calculate another?(Y/N)? "; cin >> ans; cout << endl; } while(ans == 'Y' || ans == 'y'); char letter; cout<<"Enter a letter to end the program:\n"; cin>>letter; return 0; } /************************************************************************************************************************/ double Gross(double HourlyRate) { double TotalHours = 0.0; double HoursWorked; double OvertimeHrs = 0.0; double RegPay; double OvertimePay, grossPay; char *day[7]={"Sunday","Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; for(int i=0; i<7; i++) { cout << "Hours worked on " << day[i] <<": "; cin >> HoursWorked; HoursWorked += HoursWorked; } cout << endl; if(HoursWorked < 40) { RegPay = HourlyRate * HoursWorked; } TotalHours = TotalHours + HoursWorked; if(TotalHours > 40) { OvertimePay = OvertimeHrs * RegPay * 1.5; grossPay = OvertimePay * RegPay; } return (RegPay + OvertimePay); } /************************************************************************************************************************/ char mStatusDetermination() { char mStatus; int count = 0; do { cout << "Is Marital Status Married or Single?\n"; cout << "(M=married/S=single):\t"; cin >> mStatus; cout << endl << endl; if(mStatus == 'M' || mStatus == 'm' || mStatus == 'S' || mStatus == 's') count++; } while(count < 1); return mStatus; } /************************************************************************************************************************/ double FederalTax(char MaritalStatus, double GrossPay) { const double MarriedFedTax =.15; const double SingleFedTax =.20; if(MaritalStatus == 'M' || MaritalStatus == 'm') { return (GrossPay * MarriedFedTax); } else { return (GrossPay * SingleFedTax); } } /************************************************************************************************************************/ double StateTax(double GrossPay) { const double StateTaxRate = .04; return (GrossPay * StateTaxRate); } /************************************************************************************************************************/ double LocalTax(double GrossPay) { const double LocalTaxRate = .02; return (GrossPay * LocalTaxRate); } /************************************************************************************************************************/ double MedInsuranceDeductions(char MaritalStatus) { const double MarriedDeductionRate = 18.00; const double SingleDeductionRate = 10.00; if(MaritalStatus == 'M' || MaritalStatus == 'm') { return MarriedDeductionRate; } else { return SingleDeductionRate; } } /************************************************************************************************************************/ double TakeHomePay(double GrossPay, double TotalDeductions, double ExtraDeductions) { return (GrossPay - TotalDeductions - ExtraDeductions); } /************************************************************************************************************************/ void DisplayPayrollReport(double GrossPay, double HourlyRate, double federalDeductions, double stateDeductions, double localDeductions, double ExtraDeductions, double NetPay) { cout<<" Employee Earnings are:\n" <<"----------------------------------------\n" <<setw(15)<<"Gross Pay"<<setw(9)<<setprecision(2)<<setiosflags(ios::fixed | ios::showpoint)<<GrossPay<<"\n" <<setw(15)<<"Pay Rate"<<setw(9)<<HourlyRate<<"\n\n\n\n" <<" Deductions for the WorkWeek are:\n" <<"------------------------------------------\n" <<setw(15)<<"Federal Taxes"<<setw(9)<<federalDeductions<<"\n" <<setw(15)<<"State Taxes"<<setw(9)<<stateDeductions<<"\n" <<setw(15)<<"Local Taxes"<<setw(9)<<localDeductions<<"\n" <<setw(15)<<"Insurance"<<setw(9)<<ExtraDeductions<<"\n\n\n\n" <<setw(15)<<"Net Pay"<<setw(9)<<NetPay<<"\n"; }