Conversion of number into another number with different base using recursion?
<p>I am converting a number into another number with different base using recursion but here is an problem in my code. My code is not according to my requirement. Please check and tell me where is the problem?
Thanks!</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;
int baseFunction(int, int);
int main()
{
    int number,base;
    cout&lt;&lt;"Enter number: ";
    cin&gt;&gt;number;
    cout&lt;&lt;"Enter base: ";
    cin&gt;&gt;base;
    cout&lt;&lt;"OutPut "&lt;&lt;number&lt;&lt;" is ";
    baseFunction(number,base);
    cout&lt;&lt;" in base "&lt;&lt;base&lt;&lt;endl;

}
int baseFunction(int n,int b)
{
    if(n==1)
        return n;
    else
    {
        baseFunction(n/b,b);
        cout&lt;&lt;n%b;
    }

}
</code></pre>