title: How to avoid "if" chains?
body: <p>Assuming I have this pseudo-code:</p>
  
  <pre><code>bool conditionA = executeStepA();
  if (conditionA){
      bool conditionB = executeStepB();
      if (conditionB){
          bool conditionC = executeStepC();
          if (conditionC){
              ...
          }
      }
  }
  
  executeThisFunctionInAnyCase();
  </code></pre>
  
  <p>Functions <code>executeStepX</code> should be executed if and only if the previous succeed.
  In any case, the <code>executeThisFunctionInAnyCase</code> function should be called at the end.
  I'm a newbie in programming, so sorry for the very basic question: is there a way (in C/C++ for example) to avoid that long <code>if</code> chain producing that sort of "pyramid of code", at the expense of the code legibility?</p>
  
  <p>I know that if we could skip the <code>executeThisFunctionInAnyCase</code> function call, the code could be simplified as:</p>
  
  <pre><code>bool conditionA = executeStepA();
  if (!conditionA) return;
  bool conditionB = executeStepB();
  if (!conditionB) return;
  bool conditionC = executeStepC();
  if (!conditionC) return;
  </code></pre>
  
  <p>But the constraint is the <code>executeThisFunctionInAnyCase</code> function call.
  Could the <code>break</code> statement be used in some way?</p>