CJCoding With Joseph

Power with a Loop

Read two integers, a base and an exponent (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
๐Ÿ“ฅ Auto-Input:
2 5\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.