{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ICA #1

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

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

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.

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

View Full Document
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.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}