Question: Write a program that can be used to calculate the federal tax. this is what i have so far, what do i need to fix,
Write a program that can be used to calculate the federal tax.
this is what i have so far, what do i need to fix, and how should i call my functions to the main function:
#include
#include
#include
using namespace std;
void getDatachar mStatus, int numOfPpl, double grossSalary, double pensionFund
int children ;
cout "Enter M for married or S for single: ;
cin mStatus;
iftouppermStatus M
cout "Enter number of childer under : ;
cin children;
numOfPpl children;
else
numOfPpl ;
cout Enter gross salary: ;
cin grossSalary;
cout "Enter pension fund up to : ;
cin pensionFund;
if pensionFund pensionFund
pensionFund pensionFund grossSalary;
else
cout "Wrong number enterd. Enter a number up to ;
cout endl;
double taxAmountchar mStatus, int numOfPpl, double grossSalary, double pensionFund
double standardExemption;
double personalExemption ;
if mStatus M mStatus M
standardExemption ;
personalExemption numOfPpl;
else
standardExemption ;
double taxableIncome grossSalary standardExemption pensionFund personalExemption;
double tax;
if taxableIncome
tax taxableIncome ;
else if taxableIncome
tax taxableIncome ;
else
tax taxableIncome ;
int main
char mStatus;
int numOfPpl ;
double grossSalary pension ;
double federalTax taxableIncome ;
cout fixed showpoint setprecision;
cout "Marital Status: mStatus endl;
cout "Income earned: $ grossSalary endl;
cout "Pension Plan Contribution: $ pension endl;
cout
Taxable Income: $ taxableIncome endl;
cout "The federal tax payable is: $ federalTax endl;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
