Skip to main content\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 5.8 Selection-WE4-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 no else branch
Subsection 5.8.1
Exercises Exercises
1.
Q11: Click on the statements belonging to the else-branch in the following code
if (alpha < delta)
gamma = alpha + 5;
else
gamma = beta + 5;
eta = beta + 2;
Use this given setup for each of the questions below.
int alpha = 2;
int beta = 1;
int delta = 3;
int eta = 0;
int gamma = 0;
2.
3.
You have attempted
of
activities on this page.