Look at your second loop:
while (last = 0) {
printf("%f", last*2);
}
Since you don't change the value of
last
inside the loop, if it ever got in - which it won't - it could never exit.
But it will never enter the second loop because '=' is an assignment operator, not a comparison operator. And in C, zero values are treated as false.
I'd strongly suggest that you spend a little time getting used to the debugger - it would have shown you this very, very quickly...