Need help with this difficult code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Need help with this difficult code

Write a method named pow that uses a Scanner to prompt the user for a base and an exponent and returns the base raised to the given power. For example, the call pow(3, 4) returns 3 * 3 * 3 * 3 = 81. Do NOT use Math.pow in your solution; use a cumulative algorithm instead. Assume that base and exponent are non-negative.

15th Mar 2017, 8:01 AM
que Harris
que Harris - avatar
1 Answer
15th Mar 2017, 8:17 AM
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender)
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender) - avatar