title: Excluding Dates from Print Loop
body: <p>How would I go about excluding any day from my print outs that was a friday and the 13th day of the month.  I'm attempting to write something along the lines of: if (dayofweek != 5 &amp;&amp; dayofmonth != 13), then print.  How could I implement that into the following code?</p>
  
  <pre><code>public class LoopDate {
  
  public static void main(String[] args) {
  
      //Denotes that Tuesday is the first day of 2013
      int startingDayOfWeek = 2;
      int year = 2013;
      int numDays = 0;
      for (int month = 1; month &lt;= 12; month++) {
          switch (month) {
          case 1:
          case 3:
          case 5:
          case 7:
          case 8:
          case 10:
          case 12:
              numDays = 31;
              break;
          case 4:
          case 6:
          case 9:
          case 11:
              numDays = 30;
              break;
          case 2:
              if (((year % 4 == 0) &amp;&amp; !(year % 100 == 0))
                      || (year % 400 == 0))
                  numDays = 29;
              else
                  numDays = 28;
              break;
          default:
              System.out.println("Invalid month.");
              break;
          }
          for (int start = 1; start &lt;= numDays; start++)
              System.out.println(month + "/" + start);
  
  
          }
      }
  }
  </code></pre>