awadee / thinkjavasolutions

Automatically exported from code.google.com/p/thinkjavasolutions
0 stars 0 forks source link

Fermat's last theorem exercise makes an invalid Java assumption #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
You should assume that there is a method named raiseToPow that takes two
integers as arguments and that raises the first argument to the power of the
second. For example:
int x = raiseToPow(2, 3);
would assign the value 8 to x, because 23 = 8

Actually, it needs to say 

You should assume that there is a method named Math.Pow that takes two
integers as arguments and that raises the first argument to the power of the
second. For example:
int x = Math.Pow(2, 3);
would assign the value 8 to x, because 23 = 8

Original issue reported on code.google.com by stevehwa...@gmail.com on 29 Aug 2014 at 6:27