How to impress the locals...
Milan Zimmermann
milan.zimmermann at sympatico.ca
Thu Jul 21 04:12:00 UTC 2005
On July 20, 2005 19:02, John H Woods wrote:
> PS: I know Windows 'calc.exe' can do it, but just try getting that answer
> in Java in a couple of seconds of coding! ... JHW
well it's not too terrible (though i agree this is more than couple of
seconds, plus this is BeanShell so perhaps that is not an acceptable answer
to the java note. )
bsh % b = new BigDecimal(1);
bsh % for (i = 1; i <= 5000; i++) b = b.multiply(new BigDecimal(i));
bsh % print(b.toString().length());
More information about the Squeak-dev
mailing list
|