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)
- Create a program that outputs a result for a student based upon the mean grade of eight module grades and a project mark. The rules for the marks are the same as for the above exercises. The pass mark is 40 and a valid grade is in the range [0,100]. These rules apply to individual module grades and to the project. The result is computed as follows: If any individual module grade or the project grade is not valid then the result is “ERROR”. If any single grade (for a module or the project) is less than 40, the result is “FAIL”. If the mean mark for the modules is less than 40, the result is “FAIL”. If the criteria for “ERROR” and “FAIL” do not apply, and either the mean grade or the project grade is less than 50, the result is “PASS”. If the criteria for “ERROR”, “FAIL” and “PASS” do not apply, and either the mean grade or the project grade is less than 70, the result is “MERIT”. If the mean module grade and the project grade are greater than or equal to 70, the result is “DISTINCTION”.…arrow_forwardAn oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The spilled oil sits on top of the water and causes a natural disaster. For simplicity, suppose that the oil sits on top of the water in the form of a circle. Write a program that prompts the user to enter the rate at which the ruptured pipe pumps oil (in gallons) per minute, the thickness of the oil on top of the water, and the number of days for which the area is covered by the spilled oil. The program outputs the spilled area (in kilometer) and the volume of oil (in gallons) on top of the water after each day.arrow_forwardPlease do this in Python Programming and provide Screenshots The output should be exact same like in the examples. If the output in the example is in 2 decimals, then it should be like that. 1d - Electronics The electrics company 'The Battered Battery' is nearly bankrupt. To avoid total disaster, the marketing branch has come up with a special sale to attract more customers. Whenever a customer buys three products, he or she receives a 15% discount on the most expensive product. Write a program that takes the prices of three products as input and prints the discount and final price as output. Remember that the goal of making the assignments in this chapter is to practice the use of if-statements. Therefore, do not use the built-in function max or a sorting function in this assignment. Example: Enter the price of the first article: 200Enter the price of the second article: 50Enter the price of the third article: 25Discount: 30.00Total: 245.00 Put your program in electronics.pyarrow_forward
- 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_forwardPlease use C Program In order to discourage excess electric consumption, an electrical company charges its customers a lower rate of P75 for the first 250 kilowatt-hours and a higher rate of P8.5 for each additional kilowatt-hour. In addition, a 10% surtax is added to the final bill. Write a program that calculates the electrical bill given the number of kilowatt-hours consumed as input. At the end, print the number of kilowatt-hours consumed and the computed bill.arrow_forwardYou found an exciting summer job for five weeks. It pays a per hour rate (which will be input to the program), and you will work the same number of hours each week (also input). Suppose that the total tax you pay on your summer job income is 14%. After paying the taxes, you spend 10% of your net (after tax) income to buy new clothes, accessories, and school supplies. After subtracting those items from your budget, you use 25% of the remaining money buy savings bonds. In addition, your parents buy additional savings bonds for you at 50% of the amount that you buy. Write a program that prompts the user to enter the pay rate per hour and the number of hours you will work each week. The program then outputs the following:• Your income before and after taxes for your summer job.• The money you spend on clothes, accessories, and supplies.• The money you spend to buy savings bonds.• The money your parents spend to buy additional savings bonds for you.Your input for this program should be only…arrow_forward
- Write a program that computers and assess the tuition fee of the students in one trimester, based on the given mode of payment below:Plan(key) Discount/interestCash(1) 10% discountTwo-Installment 5%interestThree-Installment 10% interestSample input/output dialogue:Enter Tuition Fee: 20000Enter Mode of Payment: 2Your total tuition fee is : 21000arrow_forwardWRITE A PROGRAM TO CALCULATRE THE AREA OF A RECTANGLE OF LENGTH =5 CM AND BREADTH=8CM. CALCULATE THE PRICE OF AN ITEM COSTING 100 GHANA CEDIS AFTER A DISCOUNT OF 10% IS APPLIED TO IT. WRITE A PROGRAM TO CALCULATE THE SIMPLE INTEREST ON A LOAN AMONUT OF 50000 GHANA CEDIS AT AN INTEREST RATE OF 30% FOR A NUMBER OF YEARS WHICH WILL BE SPECIFIED BY THE USER. WRITE A PROGRAM TO CALCULAT THE AGE OF THE USER AFTER THE USER ENTERS HIS OR HER YEAR OF BIRTH.arrow_forwardQuestion 1 Write a payroll program that computes an employee's gross pay and net pay. An employee who works more than 40 hours per week should be paid at overtime rate (1.5 x regular rate) for all hours over 40. Compute net pay by deducting 10% of gross pay only if an employee earns more than RM1500.arrow_forward
- Write a program to calculate the grade point average (GPA) of a student by getting their grades for all their subjects. Grades and their grade points areGrade S 10 pointsGrade A 9 pointsGrade B 8 pointsGrade C 7 pointsGrade D 6 pointsGrade E 5 pointsGrade F 0 pointsThe program should input the number of subjects, followed by the grade obtained in each subject. The program should calculate the average of the grade points and print it.arrow_forwardPPRAC1.C Workers at a particular company have won a 7.6% pay increase. Moreover, the increase is retroactive for six months. Create a program that takes an employee’s previous annual salary as input. And then outputs the amount of retroactive pay due the employees, the new annual salary and the new monthly salary. PPRAC2.C The utilities commission has decided that the electric company overcharged its customer for 2 months last year. To make up the difference to the customers, the commission orders the company to decrease each of next month’s bill by 10%. The city also levies a 3% utility tax, which is to be applied to the bill before it is discounted. Also, the 10% discount does not apply to the utility tax. Assume electricity costs 25.50 per kilowatt. Create the program to compute for next month’s electricity bill.arrow_forwardDonald Trump has been so stressed lately that he wanted to squeeze a stress ball. As he squeezed a stress ball in the oval office, he realized he can make many stress balls of varying sizes and charge each customer $10.00 per cubic centimeter. Manufacturing these stress balls will generate jobs and Make America Great Again™! Your job is to create a program that solves for the size of each manufactured stress ball given the radius and finally solve for the total sales. Note that a stress ball is a sphere and that's 4 Volume sphere=r³ Input The first line refers to the number of products N (where N is between 1 and 50) products to be made. The next N lines is the radius of the balls (where radius is between 1.00 and 100.00) Output The first N lines of output shows the individual price of the manufactured stress ball. The last line of output shows the total amount of sales with those balls. Sample input/output 4 1.16 11.24 8.17 10.22 49.037 44611.7 17132.3 33535.3 95328.4arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education