Home   MosaicPresentation 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>>