EBK C++ PROGRAMMING: FROM PROBLEM ANALY
EBK C++ PROGRAMMING: FROM PROBLEM ANALY
8th Edition
ISBN: 8220103648530
Author: Malik
Publisher: Cengage Learning US
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 5, Problem 20PE

When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first month’s interest on $1,000 is 1000 × 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 — 6 = 19. This means after making the first payment, the loan amount is 1,000 — 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 × 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 — 5.89 = 19.11 and the remaining balance after the second payment is 981 — 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first month’s interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)

Blurred answer
Students have asked these similar questions
A company has several employees, all with different names, who perform interviews with job applicants (one applicant is interviewed by one employee). The job applicants also have different names. The interviewer makes appointments for interviews with the applicants. Each applicant may be interviewed at several occasions, possibly by different interviewers, but in that case the interviews take place during different days. The company has special interview rooms. Each interviewer uses the same room for all interviews during a day. A room may, however, be used by different interviewers during a day, as long as the interviews don't collide in time. The reservation of interview appointments is to be computerized. The database devel- oper has decided to use a single relation for all data, with the following schema: Interviews(interviewer, applicant, day, time, room) a) From the text, find functional dependencies in the relation. b) Find the keys of the relation. c) Show that the relation is…
Fergusonball players are given a star rating based on the number of points that they score and the number of fouls that they commit. Specifically, they are awarded 5 stars for each point scored, and 3 stars are taken away for each foul committed. For every player, the number of points that they score is greater than the number of fouls that they commit. Your job is to determine how many players on a team have a star rating greater than 40. You also need to determine if the team is considered a gold team which means that all the players have a star rating greater than 40. Input Specification The first line of input consists of a positive integer N representing the total number of players on the team. This is followed by a pair of consecutive lines for each player. The first line in a pair is the number of points that the player scored. The second line in a pair is the number of fouls that the player committed. Both the number of points and the number of fouls, are non-negative integers.…
A three stage amplifier is to have an overall noise temperature no greater than 7O K. The overall gain of the amplifier is to be at least 45 dB. The amplifier is to be built by adding a low-noise first stage to an existing two-stage amplifier that has the gains and noise figures shown below. The stage number refer to locations in the new amplifier. Stage Power Gain Noise Figure 20 dB 3 dB 13 15 dB 6 dB a. What is the minimum gain in decibels that the first stage can have? b. Using the gain you calculated in part (a), calculate the maximum noise figure in decibels that the first stage can have. Express answer with two decimal places. c. Suppose the gain of the first stage could be increased by 3 dB without affecting its noise figure. What would be the effect on the noise temperature of the complete amplifier?
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
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Control Structure in Data Structure - Data Structures - Computer Science Class 12; Author: Ekeeda;https://www.youtube.com/watch?v=9FTw2pXLhv4;License: Standard YouTube License, CC-BY