Home   MosaicPresentation format
<http://cnfolio.com/IntroToComputingTopic04p07>

Decision with if / else statement and logical negation



Pseudo code:

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


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




 



<<B142L – Control structures>>