Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In shopping for a new house, you must consider several factors. In this problem the initial cost of the house, estimated annual fuel costs,
In shopping for a new house, you must consider several factors. In this problem the initial cost of the house, estimated annual fuel costs, and annual tax rate are available. Write a program that will determine the total cost after a five-year period for each of three houses. On each line, the text up to the colon is displayed by your program while the number is input by the user and read by your program. Do not hard code the numbers. Here is an example of a program run: Input the initial cost of the first house: 175000 What is the annual fuel cost of the first house? 2500 Tax rate of the first house? 0.025 Input the initial cost of the second house: 200000 What is the annual fuel cost of the second house? 2800 Tax rate of the second house? 0.025 Input the initial cost of the third house: 210000 What is the annual fuel cost of the third house? 2050 Tax rate of the third house? 0.020 To calculate the house cost, add the fuel cost for 5 years to the initial cost, then calculate taxes for five years and add them to the value obtained in adding initial cost and fuel costs. Taxes for one year are computed by multiplying the tax rate and the initial cost. Write statements to print output formatted to look as follows: INITIALHOUSE COST $175,000.00 ANNUAL FUEL COST $12,500.00 TAXES $21,875 TOTAL COST $209,375.00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started