ICA #1 - Ben Melchers Engr 141 ICA # 1 1. 17-1: (Create a...

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

View Full Document Right Arrow Icon
Ben Melchers Engr 141 ICA # 1 1. 17-1: (Create a written algorithm to determine the factorial value of an input integer between 1 and 10. Add a statement to check for input range.) Known: - The minimum value in the factorization will be 1. - The maximum value in the factorization will be 10. Unknown: - The factorial value of the integers. Assumptions: - The factorization will include 1 and 10. Algorithm: 1. Check for input range. 2. Input the value of the chosen integer. 3. Input the minimum value of the integer range. 4. Multiply the minimum value by the next integer in the input range. 5. Multiply the value calculated from the previous step by the next integer in the input range. 6. Continue this process until the chosen integer has been multiplied. 7. Display the calculated value.
Background image of page 1

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

View Full DocumentRight Arrow Icon
8. End of process. 2. 17-6: Flowchart. 17-5: Written algorithm. Known: - The traffic light has three colors: green, yellow, red. - These colors mean go, slow down, and stop, respectively. Assumption: - That the driver will obey the law, and not ignore the color of the light. Algorithm: 1. Look at the color of the traffic light. 2. If the color is green a. Continue driving at the required speed limit. START END Display the calculated value. Input the value of the chosen integer. Input the minimum value of the integer range. Check for input range.
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.

This note was uploaded on 03/03/2010 for the course ENGR 141 taught by Professor Bowman during the Spring '07 term at Clemson.

Page1 / 11

ICA #1 - Ben Melchers Engr 141 ICA # 1 1. 17-1: (Create a...

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