title: How to calculate how many times a number goes into another number
body: <p>This is the program with the initial 'number' stated in the question taken as 'n' and the 'other number' taken as 10.</p>
  
  <pre><code>void divideme()
      static int count=0; //initalised a variable which I'll be returning the value of.
      int n;
      cin&gt;&gt;n;//taken input of variable which I want to divide by another number (say 10 in this case)
      int &amp;rem=n;//created a reference variable which stores the value of n.
  
              while (rem&gt;=10) {
                  rem=rem%10; //this is to be corrected as rem = rem - 10;
                  count++;
              }
  
  
  
      return count;
  </code></pre>