title: Accept a number and print its alternate digits,
body: <pre><code>int Rearrange(int a)
  {
      long int b,j,i=0,num=0,count=0,arr[100];
      while(a&gt;0)
      {
          b=a%10;a=a/10;
          arr[i]=b;
          i++;
          count ++;
      }
      j=count;
      for(i=0;i&lt;=count/2;i++)
      {
          t=arr[i]; 
          arr[i]=arr[count-i-1];
          arr[count-i-1]=t;
          count--;
      }
      for(i=0;i&lt;j;i+=2)
      {
          num=num*10 + arr[i]%10;
      }
      return num;
  }
  </code></pre>
  
  <p>I want to write a function in c <code>rearrange</code> which prints the alternate digits of a number it is given.</p>
  
  <p>for example:</p>
  
  <pre><code>input:- 12345
  output:- 135
  </code></pre>
  
  <p>Thank you</p>