you can limit most c++ programs with sleep() which 'usually' lets the cpu do a context switch and give a time slice to another program. Its not really necessary since the invention of multi-core; the OS isn't going to lock up due to your tight loop like it did in 1995 :) (one version of windows would lock up and crash if you just held the mouse button down too long, think it was NT server prepatch). You could not move the mouse in windows pre-multi-core if your program hogged the cpu too much with a high enough priority. I think they nerfed the real-time priority thing because of this; you could set a program real time and nothing else ran, not the OS, nothing, unless it had free cpu. I used it for seti @ home back when (nongraphical version).
There is a formula that directly computes approximate factorials to very good precision. I don't recall where it starts to fail in precision, but if you are doing some stupidly huge number factorial, you don't need to do all that multiplication. It isn't reliable for smaller values.