base conversion in c programming language
<p>Could anyone point out what is wrong with this piece of code? I'm trying to write a simple(without using arrays and stuff like that) program that would convert the base 10 numbers to any other base. I'm a beginner, I've just started coding in C.</p>

<p>PS: As you can see I haven't written anything that would inverse the results, and I didn't receive any outputs from the compiler. It stopped working.</p>

<pre><code>main()
{
    int a,b,c;
    printf("Please enter a number in base 10: ");
    scanf("%d",&amp;a);
    printf("\nPlease enter the base that you want the number to be converted to: ");
    scanf("%d",&amp;b);
    do
    {
        c=a%b;
        printf("%d",c);
        a/=b;
    }while(c!=0);
}
</code></pre>