IN PSEUDOCODE and C++
Program 3: Give a baby $5,000! Did you know that, over the last century, the stock market has returned an average of 10%? You may not care, but you’d better pay attention to this one. If you were to give a newborn baby $5000, put that money in the stock market and NOT add any additional money per year, that money would grow to over $2.9 million by the time that baby is ready for retirement (67 years)! Don’t believe us? Check out the compound interest calculator from MoneyChimp and plug in the numbers!
To keep things simple, we’ll calculate interest in a simple way. You take the original amount (called the principle) and add back in a percentage rate of growth (called the interest rate) at the end of the year. For example, if we had $1,000 as our principle and had a 10% rate of growth, the next year we would have $1,100. The year after that, we would have $1,210 (or $1,100 plus 10% of $1,100). However, we usually add in additional money each year which, for simplicity, is included before calculating the interest.
Your task is to design (pseudocode) and implement (source) for a program that 1) reads in the principle, additional annual money, years to grow, and interest rate from the user, and 2) print out how much money they have each year. Task 3: think about when you earn the most money!
Lesson learned: whether it’s your code or your money, save early and save often…
Sample run 1:
Enter the principle: 2000
Enter the annual addition: 300
Enter the number of years to grow: 10
Enter the interest rate as a percentage: 10
Year 0: $2000
Year 1: $2530
Year 2: $3113
Year 3: $3754.3
Year 4: $4459.73
Year 5: $5235.7
Year 6: $6089.27
Year 7: $7028.2
Year 8: $8061.02
Year 9: $9197.12
Year 10: $10446.8
Sample run 2 (yeah, that’s $9.4MM):
Enter the principle: 5000
Enter the annual addition: 1000
Enter the number of years to grow: 67
Enter the interest rate as a percentage: 10
Year 0: $5000
Year 1: $6600
Year 2: $8360
Year 3: $10296
Year 4: $12425.6
Year 5: $14768.2
.
.
Year 59: $4.41782e+06
Year 60: $4.86071e+06
Year 61: $5.34788e+06
Year 62: $5.88376e+06
Year 63: $6.47324e+06
Year 64: $7.12167e+06
Year 65: $7.83493e+06
Year 66: $8.61952e+06
Year 67: $9.48258e+06
PseudoCode:
start
input principle,annual_addition,years,rate_of_interest
initialize amt:=principle
for i in 0....n+1
do
print "Year "+i+": $"+amt
amt=amt+addition
amt=amt+rate/100*amt
done
end
Solution(Source code):
#include<iostream>
using namespace std;
int main()
{
long principle,addition,years;
int i;
double amt,rate;
cout<<"Enter the principle: ";
cin>>principle;
cout<<"Enter the annual addition: ";
cin>>addition;
cout<<"Enter the number of years to grow: ";
cin>>years;
cout<<"Enter the interest rate as a percentage: ";
cin>>rate;
amt=principle;
for(i=0;i<=years;i++)
{
cout<<"Year "<<i<<": $"<<amt<<endl;
amt=amt+addition;
amt=amt+(double)((rate/100)*amt);
}
return 0;
}
Output:



IN PSEUDOCODE and C++ Program 3: Give a baby $5,000! Did you know that, over the...
Please show all steps and explain
27) Congratulations, you just had a baby girl today! You now establish a college fund for her that you hope will grow to $500,000 in value on her 18th birthday. How much will you need to invest in the fun each year if your investments grow at an annual interest rate 8%? 28) You set up a college fund in which you pay $5,000 each year at the beginning of the year. How much...
8.3-8.6. Using the Finance Formulas potage 2 of 21 15. Suppose you invest $5,000 in a savings account that pays an annual interest rate of 4%. If the interest is compounded monthly, what is the balance in the account after 10 years? 16. You invest $5000 at 2.2% annual interest compounded quarterly. How much do you have after 5 years? 17. Against expert advice, you begin your retirement savings at age 40. You plan on retiring at age 65. How...
Please I need aclarify answers with details in all the
questions. Thank you
1. Newborn baby Gregory, born today, has doting grandparents who education. They calculate that he will need S25,000 per year for 4 years beginning at age 18. In addition, they'd like to give him a lump sum of S50,000 at age 22 so he can buy a car for his graduation. They want to make 18 equal annual payments into a 10% interest-paying account (starting today and...
This C++ Program should be written in visual studio 2017 You are to write a program that can do two things: it will help users see how long it will take to achieve a certain investment goal given an annual investment amount and an annual rate of return; also, it will help them see how long it will take to pay off a loan given a principal amount, an annual payment amount and an annual interest rate. When the user...
Question 2. (12 pts) You have extra $5,000 to invest. You do not need the money now but will need it after 3 years, so you plan to cash your investment at the end of 3 year. Usually your investments earn 7% annual interest compounded annually and you'd like to consider it as your minimum acceptable rate of return. You are considering several investment opportunities: Option 1. Depositing your money on the high interest savings account that earns 0.58% interest...
8-One year from now, you deposit $300 in a savings account. You deposit $1,800 the next year. Then you wait two more years (until 4 years from now) and deposit $1,000. If your account always earns 6% annual interest and you make no withdrawals, how much will be in the account 11 years from now? 9-You deposit $5000 for 5 years at 4% annual interest. In 5 years, you add $15,000 to your account, but the rate on your account...
1)How much money do you need to deposit into an account annually if you desire to have $9 million in 45 years. Assume a 4% annual interest rate, compounded annually. Your first deposit will occur at the end of the first year. 2) Your machine operator is becoming more productive and generates additional profit each year. You expect to receive $39,000 in profit at the end of the year, but this will increase by 8% a year for the next...
You set up a college fund in which you pay $2000 each year at the end of the year. How much money will you have accumulated in the fund after 8 years, if your fund earns 11% compounded annually? Your Answer: What is the effective annual rate (EAR) of 8% compounded monthly? (Enter your answers as a decimal rounded to 4 decimal places, not a percentage. For example, enter 0.0843 instead of 8.43%) Your Answer:
Please solve these i. You deposit $6000 in an account earning 2% interest compounded monthly. How much will you have in the account in 10 years? ii. Find the time required for an investment of 5000 dollars to grow to 7900 dollars at an interest rate of 7.5 percent per year, compounded quarterly. Round your answer to two decimal places Your answer is t= iii. You currently have $2,800 (Present Value) in an account that has an interest rate of...
Your rich aunt is going to give you an end-of-year gift of $1,100 for each of the next 10 years. a. If general price inflation is expected to average 6% per year during the next 10 years, what is the equivalent value of these gifts at the present time? The real interest rate is 5% per year. b. Suppose that your aunt specified that the annual gifts of $1,100 are to be increased by 6% each year to keep pace...