โ Back to Loops
Question 43
Power with a Loop
Power with a Loop
Read two integers, a base and an exponent (both on the input, base first). Use a loop to compute base raised to the exponent WITHOUT using pow(). Print the result. Example: input '2 5' means 2 to the power 5, so print 32.
Expected Output:
32
Topics:
Loops
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.