# Week 4

:::{topic} Learning goals
- generate random numbers
  - use them to select random items
- convert a decision table to a `switch` and `if-else` statement
- read a single character using `getchar()`
- draw hierarchical flowcharts
- use `enum` for enumerated types
  - implement a state machine using `enum`
  - use `typedef` in `enum` declaration
- use string concatenation (or raw string literals) for text spanning several lines
:::

:::{toctree}
:maxdepth: 1
week04/rock-scissors-paper-lizard-spock
week04/generating-random-numbers
week04/reading-a-single-character-from-stdin
week04/enumerated-type
week04/switch
week04/do-while
week04/string-literals-spanning-multiple-lines
week04/rpssl-resolution-logic
week04/back-to-the-problem
:::


<!--
do while()
enum
  - idiom with count
when declare variables inside, when global?
defining variables in context
scope?
continue?

exiting a program:
return in main
exit() in other functions
-->