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++ (10th 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)
- Q1. Write a program in which the output of the program should be the performance result of a student till its last semester. The performance is calculated on the basis of CGPA obtained by student. The performance is Excellent if student CGPA is greater than 3.5 and less than equal to 4.0, good if student CGPA is greater than 3.0 and less than equal to 3.5, satisfactory if student CGPA is greater than 2.0 and less than equal to 3.5 and not satisfactory if less than equal to 2.0. The GPA is calculated on the basis of following points, user will enter the percentage of student subjects (at least 5) and your program should give the performance output of student. Your program should display the grade of each subject. Marks Grades Undergraduate points 90-100 A 4.00 86-89 A- 3.67 81-85 B+ 3.33 77-80 3.00 72-76 В- 2.67 68-71 С+ 2.33 63-67 C 2.00 58-62 С- 1.67 54-57 D+ 1.33 50-53 D 1.00 Below 50 F 0.00arrow_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_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_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_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_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_forward
- PPRAC1.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_forwardWrite 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_forwardThis program deals with processing the results of a survey which was recently conducted. This survey was intended to determine the percentage of students who walk tocampus, the percentage who drive to campus and the percentage who live in residence on campus.The results of the survey are recorded as follows: WDDL... This data is to be interpreted as follows: the first person surveyed said that he walks – hence W isrecorded, the second person said that he drives – hence D, the third person said that he drives –hence D, and the fourth person said that he lives on campus – hence L. Write a program to which inputs the response for each student and which computes / outputs therequired percentages. Assume that 25 students were surveyed. Your prompt should have the following format: Do you walk, drive or live on campus. UseW – if you walkD – if you driveL – if you live on campusUse the following data for the execution of your program: W D D L L W D D L L W W D D W L W L L D W L W L Darrow_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