What basically people are trying you to answer is that 0 means "false" in C and everything else means "true". So, by writing while(0), you are basically saying "while false" which, of course, evalute to false...

And by the way, this is an infinite loop if r > 1
Code:
for (n = 1; n <= r; n * 2)
{
    subt = n;
}
instead, you should write something like
Code:
for (n = 1; n <= r; n = n * 2)
{
    subt = n;
}
Also, you could rewrite your code so it have a nicer and easier to understand structure/logic. But it's not that bad either...

Also, you might want to check the return value of sscanf and check if the number entered by the user is non negative before entering your loop.