Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need help on trying to write a code. i just dont know where to start i am trying to get the imformation into the
i need help on trying to write a code. i just dont know where to start
i am trying to get the imformation into the table to go with the equation
ble.cofcedu/CSC1220/03 Assignments/HW1/HW1_Cl.pdf + | A Read aloud | YE Assignment: When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the account, but also on the interest that has accumulated over time. Suppose you want to deposit some money into a savings account, and let the account car compound interest for a certain number of years. The formula for calculating the balance of the account after a specified number of years is: B = P(1+5) The terms in the formula are: B is the balance in the account after the specified nuthber of years. Pis the principal amount that was originally deposited into the account. r is the annual interest rate. n is the number of times per year that the interest is compounded. t is the specified number of years. Write a program that makes the calculation for you. The program should ask the user to input the following: The amount of principal originally deposited into the account The annual interest rate paid by the account The number of times per year that the interest is compounded (For example, if interest is compounded monthly, enter 12. If interest is compounded quarterly, enter 4.) The number of years the account will be left to earn interest Once the input data has been entered, the program should calculate and display the amount of money (balance) that will be in the account after the specified number of years, and the interest the bank pays. Note: The user should enter the interest rate as a percentage. For example, 5.3% would be entered as 5.3, not as .053. The program will then have to divide the input by 100 to move the decimal point to the correct position. . Save your program as compound interesseny You can use the following data to test your program to see whether it is correct. Principal years Interest Number of compounding Balance (calculated) Total interest period S 1000 (calculated) 4 0.5% 4 $ 1020.1885982067196 S 40000 $ 20.188598206719576 5 0,65% 4 $ 41320.26577871623 S 250000 S 1320.2657787162316 10 0.85% 2 $ 272130.24756014155 S 22130.24756014155 S 1000 20 0.4% 12 $ 1083.2726271525664 S 83.27262715256643 6. Please modify your code to round the outputs to the 2 decimal precisions Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started