Create variables as needed to create the output below that uses a for loop. You will need the following: A variable to s

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Create variables as needed to create the output below that uses a for loop. You will need the following: A variable to s

Post by answerhappygod »

Create variables as needed to create the outputbelow that uses a for loop. You willneed the following:
A variable to store the balance. This data is promptedfor.A variable to store the number of years to save. This data isprompted for.A variable to store the annual percentage interest rate (APR). Thisdata is prompted for. This data is typically expressed as 0.05 for5%.Using a for loop: generate the resultsbelow. The numbers in red are input variables. Your code needs towork with any numerical value. The new balance can be calculatedas
balance = balance * ( 1 + interestRate) ;
Include the display "Done" once the loop process iscompleted.
*********** (START)
Enter Balance:1000.00Enter Interest Rate:0.032Enter years:10
Year Balance1 1032.002 1065.023 1099.104 1134.285 1170.576 1208.037 1246.698 1286.589 1327.7510 1370.24
Done!
*********** (END)
Extra Credit ( 2 points ) - If the balance reaches over twicethe original investment - display "You have doubled yourinvestment!" and stop the loop processing.
Deliverable is a working C program.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply