title: Count digits of number without loop C++
body: <p>I have to count the number of digits in a number.  </p>
  
  <p>I  divide the number to 10 until I get 0. Each iteration increments the counter.  </p>
  
  <pre><code>int num;
  cin&gt;&gt;num;  
  while(num &gt; 0)  
  {  
    counter++;
    num = num / 10;   
  }
  </code></pre>
  
  <p>The challenge is not using any loops or recursion, just an <code>if</code> statement.</p>
  
  <p>Is it possible?</p>