designreport6 - Benjamin Jones 02/12/08 Design Report...

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

View Full Document Right Arrow Icon
Benjamin Jones 02/12/08 Design Report Laboratory 6 Primary Organization 1. Get necessary input from user 2. Calculate the nth root of a value to a given precision 3. Output the nth root of that value when a precision is met Modular Organization 1. Get necessary input from user A. Ask the user for a number to root between 0 and 100 (type double) I. Read input B. Validate input I. If input is not between 0 and 100 a. Then warn user b. Exit program C. Ask the user for which nth root to take between 2 and 10 (type double) I. Read input D. Validate input I. If input is not between 2 and 10 a. Then warn user b. Exit program E. Ask the user for a desired precision as an uncertainty (type double) I. Read input 2. Calculate the nth root of the number to a given precision
Background image of page 1

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

View Full DocumentRight Arrow Icon
A. Evaluate as a function to find the nth root B. Store result (type double) 3. Determine which root we're taking for output A. If nth root is 2 I. Then output “The square root of <number> is <result>” B. If nth root is 3 I. Then output “The cube root of <number> is <result>”
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

designreport6 - Benjamin Jones 02/12/08 Design Report...

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

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