rand select between n and m
<p>here is code from programming pearls this code prints random   numbers in decreasing form</p>

<pre><code>void randselect(m,n){
pre 0&lt;=m&lt;=n;
poset : m  distinct integers  from 0 ...n-1  printed in decreasing form
 if (m&gt;0) 
 if ( bigrand() %n)&lt;m
 print n-1//here i dont understand print  n-1 what means?printf(n-1) or?i will show code
 randselect(m-1.n-1);
else
 randselect(m,n-1)
</code></pre>

<p>there is another question :
how print it increasing order? here is code which has bugs</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
using std::cout;
using std::printf;
using namespace std;

int bigrand(){  return RAND_MAX*rand()+rand();}

void randselect(int n,int m)
{
  if (m&gt;0)
     if (bigrand()%n&lt;m)
     {
         printf("",n-1);
         randselect(m-1,n-1);
     }
     else{
         randselect(m,n-1);
     }
}
int main()
{
  int m,n;

  cin&gt;&gt;n&gt;&gt;m;
  randselect(n,m);

  return 0;
}
</code></pre>

<p>please help it does not show me  any output according to main code what is mistake in my code?</p>
