#include <iostream>
using namespace std;
int getNumChild()
{
int numChildren = 0;
cout <<"How many children do you have? ";
cin >> numChildren;
return numChildren;
}
int calCredit(int numChildren, double income)
{
int totCredit = 0;
totCredit = numChildren * 1000;
if (income < 70,000)
{
if (totCredit > 4000)
{
totCredit = 4000;
}
}
return totCredit;
}
double getIncome()
{
double income = 0.0;
cout << "Please enter how much your yearly salary is: ";
cin >> income;
return income;
}
int main()
{
int totCredit = 0;
int numChildren = 0;
double income = 0.0;
numChildren = getNumChild ();
income = getIncome ();
totCredit = calCredit (numChildren, &income);
cout << "Total child tax credit: " << totCredit << endl;
system("PAUSE");
return 0;
}
. A family can claim $1000 tax credit per child, but the total child tax credit cannot exceed $4000. Recently the tax law has changed. The $4000 upper limit applies only if the family income exceeds $70,000. In other words, families with income more than $70,000 can claim $4000 child tax credit at the most, but families with income $70,000 or less can claim more than $4000 child tax credit if there are more than 4 children ($1000 credit per child). Write a new program to calculate child tax credit. In addition to main(), also use the following two functions in your program:
I'm sorry to put this all on you guys, but i'm truly stuck and I could use any help I could get.
Thanks so much (and if i messed up with my post please let me know)