Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need to write a code in C, but not in C++ You are tasked with writing a program that will compute the return on
I need to write a code in C, but not in C++
You are tasked with writing a program that will compute the return on a yearly compounded interest investment. Your program should prompt the user for the following pieces of data: Principal, Interest Rate, the number of years to compute. The formula to calculate a compound interest return is: Present Value (1interest rate)Number of period I want you to compute the answer using iteration so that you can see the value at the end of each period during your investment. You will be required to compute the yearly interest and add it to the starting principal for each year What you will need: A loop with a test condition. Formatted output. These calculations are done one step at a time: 1. Calculate the Interest (-"Loan at Start" Interest Rate) 2. Add the Interest to the "Loan at Start" to get the "Loan at End" of that year 3. The "Loan at End" of the year is the "Loan at Start" of the next year Your program should prompt the user for the needed inputs and then compute the required items so that your output resembles the example below. Example input: 1000 5.5 17 1000 10 5 Year Principal Interest Total 2 4. n00006914aosprey hw71s $ 1000.00 $1100.00 $ 1210.00 $ 1331.00 $1464.10 $ 100.e0 $ 110.00 $ 121.00 $ 133.10 $ 146.41 $ 1100.e0 $ 1210.00 $ 1331.00 $ 1464.10 $ 1610.51 Grading: Your program must compile to earn any credit. Your Program should have your N number at the top identifying the author. Your program should not use global variables. Your program may use functions but it is not requiredStep 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