question archive How would you write the following program in Flowgorithm? The user will enter the data of their present age

How would you write the following program in Flowgorithm? The user will enter the data of their present age

Subject:Computer SciencePrice:2.87 Bought7

How would you write the following program in Flowgorithm?

The user will enter the data of their present age. Everyone is considered to be retiring at 70 for purposes of this application. The user will also enter how much money per year they will place into the retirement plan.

With these values, the application will first calculate the value of the nest egg. The value of 3 percent per year will be used in the calculations.  After calculating the nest egg, the length of time the nest egg will last needs to be calculated.

First the Nest Egg Calculation.

Each year left until the user reaches 70, they will put money into the nest egg. At the end of each year, the egg grows by 3 percent. Then the next year another deposit of money and a growth again. As this calculation is performed every year, you might be looking at some kind of loop.

Show only the amount in the nest egg at age 70, when retirement starts. You do not have to show the yearly deposits and growth.

Here is s short example. Say someone is 65 and they want to put in $1,000 each year. So they have 5 years left (65 to 70), in year 1 they deposit $1,000 and then at the end of the year they get 3% interest on that $1,000. Now they have $1,030 in saving. Year 2, another $1,000 is added bringing the total at the end of the year to $2,030 and then that gets 3% interest bring the new total to $2,090.90. From that you should be able to see how to continue for years 3 and 4 and 5. At the end of 5 years, the Total after the 3% interest of year 5 is $5.468.41. That is the starting nest egg for next phase of the program.

The next step is then to show the schedule of dispersal from the nest egg.

Starting at age 70 and continuing until the nest egg is empty (value of 0) or a maximum of 30 years, the application will show the remaining amount of the nest egg after expenses and adding in a growth of 4 percent. Each year show the age of the person along with the remaining funds.

This is the reverse process of building the nest egg. Instead of putting money in each year, you will be removing it. At the end of each year, the remaining balance will grow by 4 percent. If the value of expenses is greater than the amount left in the nest egg, empty the nest out and display a Funds Depleted message.

If at the end of 30 years, there are funds remaining, show a final balance.

During the retirement years, you will need to take out for expenses $47,250. The remaining balance after that dispersal will grow by 4 percent. This calculation will give the balance at the beginning of the next year.

If a beginning balance to a year is less than or equal to the expenses, then that year depletes the nest egg. That is the age at which you display the Funds Depleted message.

Example: If on age 76, there is only $44,000 left, the display to the user would be Age 76 - Funds Depleted.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

Answer:

Flowgorithm description:

1)Declare variables age,money,sum,expense,page,i.

2)Take present age input in 'age'.

3)Take the money amount for the nest egg in 'money'.

4)Declare variable tmp to save initial amount value.

5)For loop from i=0 till 'i' is smaller than 70-age

a. money=money + tmp + sum

b. sum=money * 0.03

6)Initialise present age 'page' equal to 70

7)For loop from i=70-age till i greater than 0 and maximum 30 yrs i.e 100yrs of user

a)Take expense amount and store in 'expense'

b)If expense greater than money then:

i)Display fund depleted

c)Else calculate fund left and present age

i)money=(money-expense)+(money-expense)*0.04

ii)page=page+1

iii)Display money left and present age

8)Display remaining fund.

Note:Since the language for the flowgorithm is not provided so it made using c language.

Reference:

What is Flowgorithm: Introduction and Examples. (n.d.). Retrieved December 01, 2020, from https://mockitt.wondershare.com/flowchart/flowgorithm.html

please use this google drive link to download the answer file.

https://drive.google.com/file/d/1zfkJh_XpplSYqxog8XVAkWOfw7G5_mBG/view?usp=sharing

note: if you have any trouble in viewing/downloading the answer from the given link, please use this below guide to understand the whole process.

https://helpinhomework.org/blog/how-to-obtain-answer-through-google-drive-link