title: What is time complexity of below function?
body: <pre><code>    int sumOfDigits(int n)
      {
  
      if(n&lt;=9)
  
      return n;
  
      else
  
  
           {  
                 int r=0;
                 while(n!=0)
                     {
                          r=r+n%10;
                          n=n/10;
                     }
  
  
       sumOfDigits(r);
                  }
  
              }
  </code></pre>
  
  <p>This function finds sum of digits of a number till it becomes less than 10.
      e.g.if n=12345
      then output=6
      as 1+2+3+4+5=15,
      again 1+5=6.</p>