+ 3
How can i code a formula with power without using math.pow?
java basic
2 odpowiedzi
+ 6
public static int power(int base, int exponent) {
int result = base;
for (int x = 1; x < exponent; ++x) {
result *= base;
}
return result;
}
0
thanks