12.07.2015 Views

Flowcharting Preparation Problems - Marriott School

Flowcharting Preparation Problems - Marriott School

Flowcharting Preparation Problems - Marriott School

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3. Jim’s Years to Accumulate. Jim often counsels customers at his bank. He needs acomputer program that will calculate the number of years (Y) it will take to accumulatea specified future amount (A) of money based on a given initial deposit (D) andspecified interest rate (R). Assume interest compounds annually.Here is the variable legend:Variable LegendS = Specified AmountD = Initial DepositR = Interest Rate (%)A = Actual Future AmountY = Number of YearsThe finance formula to calculate an actual future amount (A) given D, R, and Y is asfollows:A = D * (1 + R/100)^YDraw a flowchart for an algorithm to produce the answers. Your flowchart shouldaccept S, D, and R. The algorithm should display S, D, R, A, and Y. The number ofyears (Y) is the number of years required for the actual amount (A) to equal or exceedthe specified future amount (S).Use looping (i.e., “repetition” or “iteration”) in your program. Using the exampleinputs shown below, create a loop termination table with appropriate values todemonstrate that your algorithm uses a correct loop termination condition. Includethis table with your flowchart in your answer.Example Inputs for Loop Termination TableS = 1300D = 1000R = 10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!