Home B101 B142L B202 B302 B324 M520 Mosaic Course updatesPresentation format
<http://cnfolio.com/IntroToComputingTopic04p06>

Decision with if / else statement



Pseudo code:

  1. obtain 2 cards
  2. if sum of cards equals to 21
  3.      display blackjack message
  4. else
  5.      display sum of cards


Be careful to avoid division by zero in test conditions.
Flowchart:




   



<<B142L – Control structures>>