Please enable JavaScript.
Coggle requires JavaScript to display documents.
03 Getting started with conditionals (If / else if / else (Keyboard …
03
Getting started
with conditionals
If / else if / else
Introducing if / else
Introducing else if's
Rules for control flow
Keyboard
shortcuts
if-tab-tab
else-tab-tab
Braces mismatch - diagnosing it and fixing it
Multilpe independent decisions
Exclusivity of branches
Relational operators
> greater than
>= greater than or equal to
< less than
<= less than or equal to
== equal to
!= not equal to
Structuring code
options
Embedded ifs or not?
Where else do you want to run code?
Order of branches is important (e.g. motorway speeding)
Be exact with < and <= etc.
More if / else issues - indenting accuracy
Switch statement
Possible types for
switch expression
int
enum
char
string
No drop-through
(break required)
Merging multiple branch values
Default branch
Labs
Kids in a candy store (part 1)
Evening behaviours