Concept explainers
Interest on a loan is paid on a declining balance, and hence a loan with an interest rate of, say, 14 percent can cost significantly less than 14 percent of the balance. Write a
Finally, determine what simple annualized percentage of the original loan balance was paid in interest. For example, if $1,000 was paid in interest on a $10,000 loan and it took 2 years to pay off, then the annualized interest is $500, which is 5 percent of the $10,000 loan amount. Your program should allow the user to repeat this calculation as often as desired.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Problem Solving with C++ (9th Edition)
Additional Engineering Textbook Solutions
Starting Out with C++ from Control Structures to Objects (8th Edition)
Starting Out with C++: Early Objects (9th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Modern Database Management (12th Edition)
Starting Out with Python (4th Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
- Problem: Write a program for computing the amount of money in a bank account at the end of each quarter for a period of one year. A quarter is equivalent to 3 months. Assume that the account is created at the beginning of a year (i.e. January 1). The year will be entered at run time through the keyboard. The account has an initial principal that is entered at run time through the keyboard. No deposit or withdrawal is made within the one-year period. The interest is compounded quarterly which means that the interest earned for the first quarter will form part of the principal for the second quarter, the interest earned for the second quarter will form part of the principal for the third quarter and so on. The annual interest rate is 5%. The interest rate for a quarter is computed by dividing the annual interest rate by 4 since there are four quarters in a year. The computational procedure (see algorithm) and the output of the program (see sample run) are shown below. The output includes…arrow_forwardUsing fundamentals of C I need help in coding this practice problem . A bicycle salesperson is offered a choice of wage plans: (1) a straight salary of $300 per week; (2) $3.50 per hour for 40 hours plus a 10% commission on sales; (3) a straight 15% commission on sales with no other salary. Write a program that takes asinput the salesperson's expected weekly sales and outputs the wages paid under eachplan in increasing order. I cant use arrays so just the basics. Also, I can only use #include<stdio.h> and nothing else.arrow_forwarduse pythonarrow_forward
- Simple python codearrow_forwardNote:- First ready the whole program completely and try to add all the given instructions to complete this program and also need an output for this program. Please type this program in JAVA language. Please do not copy and paste from anywhere else need an original code for this program.arrow_forwardThe population of a town A is less than the population of town B. However, the population of townA is growing faster than the population of town B. Write a program that prompts the user to enterthe population and growth rate of each town. The output of program should be after how manyyears the population of town A will be greater than or equal to the population of town B. Alsowhat will be the population of both the towns at that time?A sample input is: Population of town B = 8000, growth rate of town B = 2%, population of townA = 5000, and growth rate of town A = x. where x = last digit of your CNIC.Note: If the last digit of your CNIC is 1 or 2, add 2 to it, else no change should be made if last digitis between 3 to 9.arrow_forward
- write a python code:arrow_forwarda. Given a situation where Alex and Andrew share a bank account with Current Balance RM600 for their business. The banking system uses two methods deposit (amount) and withdraw (amount) to access bank account. Alex's program calls the deposit(RM150) and reads the Current Balance of RM600. Before the new Current Balance is saved, Andrew's program calls the withdraw(RM200) and reads the Current Balance of RM600. Alex's program changes the shared variable Current Balance to RM750 while Andrew's program changing the Current Balance variable to RM400. However, the total balance in bank account after the transactions should be RM550. Explain what can be done to prevent this race condition from occurring.arrow_forwardThe New Telephone Company has the following rate structure for long-distance calls: The regular rate for a call is P8 per minute. Any call started after 6:00P.M. (1800 hours) but before 8:00 A.M (0800 hours) is discounted 50%. Any call longer than 60 minutes receives a 15% discount. All calls are subject to 4% federal tax on the cost after any discounts. Write a program that takes the start time for a call based on a 24-hour clock and the length of the call in minutes. The gross cost (before any discounts or tax) should be displayed followed by the net cost (after discounts are deducted and tax is added).arrow_forward
- Suppose you have an investment plan where you invest a certain fixed amount every year. Modify futval.py to compute the total accumulation of your investment. The inputs to the program will be the amount to invest each year, the interest rate, and the number of years for the investment. Please step by steparrow_forwardYou are working for a lumber company, and your employer would like a program that calculatesthe 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: (image 1) The lumber is sold in different dimensions (specified in inches of width and height, and feet oflength) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which whendivided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and fourinteger numbers. The integers are the number of pieces, width, height, and length. The letter willbe one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When theletter is T, there are no integers following it on the line. The program…arrow_forwardWrite a C program that reads the income of a person and calculates his total tax according tothe following conditions: if his income is between 3 lac and 5 lac, then his tax-rate is 5% of hissalary; for the next 5 lac, tax-rate is 6%, for the next 10 lac tax is 7%, afterwards it is 8%.For e.g., if a person’s income is 22 lac, then his total tax = Tk. 0.05 *5 lac + Tk. 0.06 * 5 lac +0.07*10 lac + 0.08 * 2 lac = Tk. 1.41 lac.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr