Question: This is in Java being run through eclipse. /** * Returns the first number taken to the power of the second number * * For
This is in Java being run through eclipse.
/** * Returns the first number taken to the power of the second number * * For example pow(2,3) returns 2^3 or 8 * * DO NOT USE FUNCTIONS in Math (yes, Math.pow is how you would really do it) * Instead, write this code yourself as practice. * * Don't forget about negative powers! But both parameters are integers, * so you don't need to worry about fractional powers. * * Hint: if you want to get the reciprocal of an integer, do it like this * 1.0/coolInt not like this 1/coolInt * * Why? See section 4.2.3 in your book * * Requires: for loops */
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
