designreport5 - 2. Display current year 3. Display current...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Benjamin Jones 06 February 2008 Design Report Laboratory 5 I. Get the interest from the user expressed as a percent (a floating point number) a. Validate the input (make sure it is non-negative, and less than 100) 1. If input is greater than 100 or less than zero A. Then display warning to user B. Exit program b. Convert user input to fractional equivalent 1. Set percent interest equal to user input divided by 100 II. Calculate and display interest accumulation over ten years a. Initialize counter to current year (2008) b. Display output header (Year, Current Savings, Interest Amount, New Savings) c. Begin loop while current year is less than or equal to current year plus ten(2018) 1. Set stream precision to zero, and to fixed point (in order to round to nearest dollar)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2. Display current year 3. Display current savings 4. Calculate interest amount A. Interest amount equals current savings multiplied by percent interest 5. Display interest amount 6. Update current savings to be equal to itself added to interest amount 7. Display current savings again (this time as new savings) 8. Update counter to be next year TESTS Test Number Input Value Expected Output Actual Output 1 2018s New Savings: $1000 2 100 2018s New Savings: $2048000 3 50 2018s New Savings: $86498 4-1 Program Exits 5 101 Program Exits 6 2 2018s New Savings: $1243...
View Full Document

Page1 / 2

designreport5 - 2. Display current year 3. Display current...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online