title: Why use if-else if in C++?
body: <p>Why would you use if-else statements if you can make another if statement?</p>
  
  <p>Example with multiple ifs:</p>
  
  <pre><code>input = getInputFromUser()
  if input is "Hello"
      greet()
  
  if input is "Bye"
      sayGoodbye()
  
  if input is "Hey"
      sayHi()
  </code></pre>
  
  <p>Example with else-if:</p>
  
  <pre><code>input = getInputFromUser()
  if input is "Hello"
      greet()
  
  else if input is "Bye"
      sayGoodbye()
  
  else if input is "Hey"
      sayHi()
  </code></pre>