3.3.1. Selection-WE3-P1ΒΆ
Subgoals for Evaluating Selection Statements
Diagram which statements go together.
For if-statement, determine whether expression is true or false.
If true, follow true branch. If false, follow else branch (OR do nothing if there is no else branch).
Select-WE3-P1
Use this given setup
int alpha = 2, beta = 1, delta = 3, eta = 0, gamma = 0;
Q10: After executing the following code, the value in variable alpha
is and the value in variable gamma
is .
if (alpha > beta)
alpha = alpha + 2;
if (alpha > delta)
gamma = alpha + 5;
You have attempted of activities on this page