I want to make a java class that would print out:
The product of the two integers raised to powers 0 through 3 are:
-2 times 9 raised to the power of 0 is 1.0
-2 times 9 raised to the power of 1 is -18.0
-2 times 9 raised to the power of 2 is 324.0
-2 times 9 raised to the power of 3 is -5832.0"
I want to make this using a for loop, and each of the two integers needs to be from user input. I’ve figured out how to print it out using the System.out.print() but I haven’t figured out how to make the loop, and how to make the exponents increasing using the for loop.
How would I go about doing that?
Here’s an example of how your loop might look. You can fill in the details 🙂