B
Bl0ckeduser
I got bored after a minute of no output. Note that 100!
has nowhere near this number of digits. ....
I have a tentative rule not to allocate more than 256 bytes of
automatic storage if possible. ....
Since we only need a factorial, and since we only need decimal
output, here's a simple way of calculating in blocks of 4 digits
at a time. I'll leave it as an exercise to modify it to work on
numbers higher than 9999!
Thanks for critiquing my code and for writing a smarter version from
which I (and other noobs reading this) may learn. As a hobbyist, I
always appreciate advice from experts.
As for the exercise, I guess using a larger type for *f and increasing
the block size accordingly would work.