Chapter 4: Problem 7
Write a pseudocode If-Then statement that assigns 0.2 to commission if sales is greater than or equal to 10,000.
Chapter 4: Problem 7
Write a pseudocode If-Then statement that assigns 0.2 to commission if sales is greater than or equal to 10,000.
All the tools & learning materials you need for study success - in one app.
Get started for freeHow does a dual alternative decision structure work?
What is a control structure?
What statement do you use in pseudocode to write a dual alternative decision structure?
The following truth table shows various combinations of the values true and false connected by a logical operator. Complete the table by circling T or \(\mathrm{F}\) to indicate whether the result of such a combination is true or false. $$\begin{array}{lcc} \text { Logical Expression } & \text { Result (circle T or F) } \\ \text { True AND False } & \mathrm{T} & \mathrm{F} \\ \text { True AND True } & \mathrm{T} & \mathrm{F} \\ \text { False AND True } & \mathrm{T} & \mathrm{F} \\ \text { False AND False } & \mathrm{T} & \mathrm{F} \\ \text { True OR False } & \mathrm{T} & \mathrm{F} \\ \text { True or True } & \mathrm{T} & \mathrm{F} \\ \text { False or True } & \mathrm{T} & \mathrm{F} \\ \text { False or False } & \mathrm{T} & \mathrm{F} \\ \text { Not True } & \mathrm{T} & \mathrm{F} \\ \text { NOT False } & \mathrm{T} & \mathrm{F} \end{array}$$
Convert the following pseudocode to an If-Then-Else If statement: If number == 1 Then Display "One" Else If number == 2 Then Display "Two" Else If number == 3 Then Display "Three" Else Display "Unknown" End If End If End If
What do you think about this solution?
We value your feedback to improve our textbook solutions.