Simple Conditional Statements (IF)

A simple conditional statement is checks one condition. We use IF in VB, it is written as

  • IF <Condition> then
    • Do something
  • ELSE
    • Do something else
  • END IF

The Condition has to resolve to true or false and uses comparison operators (Comparitors). Try these tasks

  1. Says hello to people named Bob
  2. Tells you if a number is above 10
  3. Tells you which of two numbers is the biggest
  4. Tells you if a number is odd or even