Computer Science, asked by adityan93, 17 days ago

write a program to print first 10 power of 2 in Java​

Answers

Answered by 31aliahmedzahidshaik
0

Answer:

instead of using a while loop, we've used a for loop.

After each iteration, the exponent is decremented by 1, and the result is multiplied by the base exponent number of times.

Both programs above do not work if you have a negative exponent. For that, you need to use the pow() function in Java standard library.

Answered by COMMANDED
0

Answer:

I was shocked when I did not find my science journal in my cupboard! The dates of the practical exam were already announced. The practical exam was just after 3 days. We were told to submit the checked science journals and guess what! I was not able to get it.

Similar questions