title: How to go about doing something every fourth loop as well as every other loop?
body: <pre><code>int doEveryTwoTimes= 1;  // Counter to do something every two loops
  int doEveryFourTimes= 2; // Counter to do something every four loops 
  
  // add a nested infinite loop to increment counter
  while(true){
      if(doEveryTwoTimes%2 == 0){
          // DO STUFF EVERY **TWO** LOOPS
      }
  
      if(?????){
          // DO STUFF EVERY **FOUR** LOOPS
      }
  
      doEveryTwoTimes++;
      doEveryFourTimes++;
  }
  </code></pre>
  
  <p>I can add a condition to make things happen every two loops, but how do I create a condition for every <strong>fourth</strong> loop?</p>