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.2 Selection-WE1-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.2.1
Each question below is independent, but they all use this given setup
int alpha = 2;
int beta = 1;
int delta = 3;
int eta = 0;
int gamma = 0;
double omega = 2.5;
double theta = -1.3;
double kappa = 3.0;
double lambda = 0.0;
double rho = 0.0;
Exercises Exercises
1.
2.
3.
4.
5.
Click on the statements belonging to the if-branch in the following code
if (kappa < delta)
eta = 42;
beta = 22;
You have attempted
of
activities on this page.