title: From 1 to 100, print "ping" if multiple of 3, "pong" if multiple of 5, or else print the number
body: <p>I just came home from a job interview, and the interviewer asked me to write a program:</p>
  
  <p>It should, count from 1 to 100, and print...</p>
  
  <p>If it was multiple of 3, "ping"<br>
  If it was multiple of 5, "pong"<br>
  Else, print the number.</p>
  
  <p>If it was multiple of 3 AND 5 (like 15), it should print "ping" and "pong".</p>
  
  <p>I chose Javascript, and came up with this:</p>
  
  <pre><code>for (x=1; x &lt;= 100; x++){
      if( x % 3 == 0 ){
          write("ping")
      }
      if( x % 5 == 0 ){
          write("pong")
      }
      if( ( x % 3 != 0 ) &amp;&amp; ( x % 5 != 0 ) ){
          write(x)
      }
  }
  </code></pre>
  
  <p>Actualy, I left very unhappy with my solution, but I can't figure out a better one.</p>
  
  <p>Does anyone knows a better way to do that?
  It's checking twice, I didn't like it.
  I ran some tests here at home, without success, this is the only one that returns the correct answer...</p>