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 #
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 fiveyear period and run the program for each of the following sets of data.
Factors of Ownership
tabletableInitial HouseCostAnnual Fuel Cost,Tax Rate
To calculate the house cost, add the initial cost to the fuel cost for five years, then add the taxes for five 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 calculateHousingCostsdouble initialCost, double annualFuelCost, float taxRate;
Sample output:
Enter home cost USD :
Enter the tax rate:
Enter annual fuel cost USD :
Your initial cost of ownership is $
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
