On Wednesday, 31 May 2017 at 04:31:14 UTC, Ivan Kazmenko wrote:

Now, where is the old version wrong? ...

Actually, it also changes every number in the string, not only the first one as required. Because of that, it also fails the "do not touch the exponent" requirement. Sadly, both are not covered by the examples.

The program is perhaps easily fixed by changing replaceAll into replaceFirst. As for adding examples to better check the requirements, I don't know Rosettacode's policy for that.

Reply via email to