Question: Program # 2 Housing Costs In shopping for a new house, you must consider several factors. In this problem the initial cost of the house,

Program #2
Housing Costs
In shopping for a new house, you must consider several factors. In this problem the initial cost of the house, the estimated annual fuel costs, and the annual tax rate are available. Write a program that will determine the total cost of a house after a five-year period and run the program for each of the following sets of data.
Factors of Ownership
\table[[\table[[Initial House],[Cost]],Annual Fuel Cost,Tax Rate (%)],[67,000,2,300,2.5],[62,000,2,500,2.5],[75,000,1,850,2.0]]
To calculate the house cost, add the initial cost to the fuel cost for five (5) years, then add the taxes for five (5) years. Taxes for one year are computed by multiplying the tax rate by the initial cost. Write and call a function that calculates the cost of ownership, and returns it to the end user after the values are input. Your function should be similar to:
double calculateHousingCosts(double initialCost, double annualFuelCost, float taxRate);
Sample output:
Enter home cost (USD) :450000
Enter the tax rate((%):2.5
Enter annual fuel cost (USD) : 1500
Your initial cost of ownership is $513750.00
 Program #2 Housing Costs In shopping for a new house, you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!