Write a C++ program that asks the user to enter the price of a car (real), the down
payment (real) and the number of years for the loan (integer). Calculate and output
the monthly payment (real) of that car. Assume the sales tax rate is 7% and an
interest rate is 9%. Use constant declarations for these rates.
Use the following formulae to perform the calculations:
tax amount = price of car * sales tax rate
total cost of car = price of car + tax amount
borrowed amount = total cost of car ‐ down payment
interest amount = borrowed amount * interest rate
loan amount = borrowed amount + interest amount
monthly payment = loan amount / number of months of loan

4 Years
Discussion Span
Last Post by Suzie999

To get input from the user you can use "cin" function.

To print out results to screen you can use "cout" function.

To "Use constant declarations for these rates" you can use the const keyword.

Here is an example.

const int multiplier = 5;

int value;

cout << "Enter an integer :\n";

cin >> value;

cout << value << " x " << multiplier << " = " << value * multiplier;

From that, you should be able to do your homework.

Edited by Suzie999

Votes + Comments
thanks what is the result you went means hot flow program
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.