Problem Solving with C++ (9th Edition)
Problem Solving with C++ (9th Edition)
9th Edition
ISBN: 9780133591743
Author: Walter Savitch
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 2, Problem 8PP

You have just purchased a stereo system that cost $1,000 on the following credit plan: no down payment, an interest rate of 18% per year (and hence 1.5% per month), and monthly payments of $50. The monthly payment of $50 is used to pay the interest and whatever is left is used to pay part of the remaining debt. Hence, the first month you pay 1.5% of $1,000 in interest. That is $15 in interest. So, the remaining $35 is deducted from your debt, which leaves you with a debt of $965.00. The next month you pay interest of 1.5% of $965.00, which is $14.48. Hence, you can deduct $35.52 (which is $50 – $14.48) from the amount you owe. Write a program that will tell you how many months it will take you to pay off the loan, as well as the total amount of interest paid over the life of the loan. Use a loop to calculate the amount of interest and the size of the debt after each month. (Your final program need not output the monthly amount of interest paid and remaining debt, but you may want to write a preliminary version of the program that does output these values.) Use a variable to count the number of loop iterations and hence the number of months until the debt is zero. You may want to use other variables as well. The last payment may be less than $50. Do not forget the interest on the last payment. If you owe $50, then your monthly payment of $50 will not pay off your debt, although it will come close. One month’s interest on $50 is only 75 cents.

Blurred answer
Students have asked these similar questions
When you use a mortgage to purchase a home, the lending institution effectively owns the home. You buy back part ownership in the home with each monthly payment. The part you have bought back is your equity in the home. If the mortgage amount is P dollars, the monthly interest rate is r as a decimal, and the term of the mortgage is t months, then your equity after k payments is E(k) = P((1 + r)k − 1) (1 + r)t − 1  dollars. In this exercise, assume that the mortgage amount is $200,000, the APR is 6%  so r = .06/12  and the term of the loan is 30 years (360 months). (a) Find a formula for the equity. (b) Make a graph of the equity over 360 months, the term of the loan. (c) Does the graph show that you have half-ownership in the home halfway through the term of the mortgage? Halfway through the term of the mortgage corresponds to k1 = _______ payments. From the graph, we see that E(k1) is ________ half of the mortgage amount, so we  _______ have half-ownership in the home…
You are working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber. Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: Pine 0.89Fir 1.09Cedar 2.26 Maple 4.50Oak 3.10 The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and four integer numbers. The integers are the number of pieces, width, height, and length. The letter will be one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When the letter is T, there are no…
You are working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber. Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: Pine 0.89Fir 1.09Cedar 2.26Maple 4.50Oak 3.10 The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and four integer numbers. The integers are the number of pieces, width, height, and length. The letter will be one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When the letter is T, there are no…

Chapter 2 Solutions

Problem Solving with C++ (9th Edition)

Ch. 2.2 - Write a complete C++ program that writes the...Ch. 2.2 - Write a complete C++ program that reads in two...Ch. 2.2 - Prob. 13STECh. 2.2 - Write a short program that declares and...Ch. 2.3 - Convert each of the following mathematical...Ch. 2.3 - Prob. 16STECh. 2.3 - What is the output of the following program lines...Ch. 2.3 - Write a complete C++ program that reads two whole...Ch. 2.3 - Given the following fragment that purports to...Ch. 2.3 - What is the output of the following program lines...Ch. 2.4 - Write an if-else statement that outputs the word...Ch. 2.4 - Suppose savings and expenses are variables of type...Ch. 2.4 - Write an if-else statement that outputs the word...Ch. 2.4 - Write an if-else statement that outputs the word...Ch. 2.4 - Consider a quadratic expression, say x2 x 2...Ch. 2.4 - Consider the quadratic expression x2 4x + 3...Ch. 2.4 - What is the output of the following cout...Ch. 2.4 - What is the output produced by the following (when...Ch. 2.4 - What output would be produced in the previous...Ch. 2.4 - What is the output produced by the following (when...Ch. 2.4 - What is the output produced by the following (when...Ch. 2.4 - What is the most important difference between a...Ch. 2.4 - What is the output produced by the following (when...Ch. 2.4 - Write a complete C++ program that outputs the...Ch. 2.5 - The following if-else statement will compile and...Ch. 2.5 - Prob. 36STECh. 2.5 - Write a complete C++ program that asks the user...Ch. 2 - A metric ton is 35,273.92 ounces. Write a program...Ch. 2 - The Babylonian algorithm to compute the square...Ch. 2 - Many treadmills output the speed of the treadmill...Ch. 2 - Write a program that plays the game of Mad Lib....Ch. 2 - The following is a short program that computes the...Ch. 2 - A government research lab has concluded that an...Ch. 2 - Workers at a particular company have won a 7.6%...Ch. 2 - Modify your program from Programming Project 2 so...Ch. 2 - Negotiating a consumer loan is not always...Ch. 2 - Write a program that determines whether a meeting...Ch. 2 - Prob. 6PPCh. 2 - It is difficult to make a budget that spans...Ch. 2 - You have just purchased a stereo system that cost...Ch. 2 - Write a program that reads in ten whole numbers...Ch. 2 - Modify your program from Programming Project 9 so...Ch. 2 - Sound travels through air as a result of...Ch. 2 - Prob. 12PPCh. 2 - The HarrisBenedict equation estimates the number...Ch. 2 - Write a program that calculates the total grade...Ch. 2 - It is important to consider the effect of thermal...
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY