Question
omplete the following Chapter 4 exercises: 1. Algorithms problems 2. Debugging problems Submit answers to algorithms & debugging work here as a PDF document generated
omplete the following Chapter 4 exercises: 1. Algorithms problems 2. Debugging problems Submit answers to algorithms & debugging work here as a PDF document generated from your MS Wor Algorithm Workbench 1. Design an If-Then statement (or a flowchart with a single alternative decision structure) that assigns 20 to the variable y and assigns 40 to the variable z if the variable x is greater than 100. 2. Design an If-Then statement (or a flowchart with a single alternative decision structure) that assigns 0 to the variable b and assigns 1 to the variable c if the vari- able a is less than 10. 3. Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b. 212 Chapter 4 Decision Structures and Boolean Logic 4. The following pseudocode contains several nested If-Then-Else statements, Unfortunately, it was written without proper alignment and indentation Rewrite the code and use the proper conventions of alignment and indentation If score upper Then Display "The value is outside the range." Else Display "The value is within the range." End If End Module
omplete the following Chapter 4 exercises: 1. Algorithms problems 2. Debugging problems Submit answers to algorithms & debugging work here as a PDF document generated from your MS Wor Algorithm Workbench 1. Design an If-Then statement (or a flowchart with a single alternative decision structure) that assigns 20 to the variable y and assigns 40 to the variable z if the variable x is greater than 100. 2. Design an If-Then statement (or a flowchart with a single alternative decision structure) that assigns 0 to the variable b and assigns 1 to the variable c if the vari- able a is less than 10. 3. Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b. 212 Chapter 4 Decision Structures and Boolean Logic 4. The following pseudocode contains several nested If-Then-Else statements, Unfortunately, it was written without proper alignment and indentation Rewrite the code and use the proper conventions of alignment and indentation If score upper Then Display "The value is outside the range." Else Display "The value is within the range." End If End Module
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started