給定一個double類型的浮點數(shù)base和int類型的整數(shù)exponent。求base的exponent次方。
package 劍指Offer.數(shù)值的整數(shù)次方;
public class Solution {
public double Power(double base, int exponent) {
return Math.pow(base, exponent);
}
}
給定一個double類型的浮點數(shù)base和int類型的整數(shù)exponent。求base的exponent次方。
package 劍指Offer.數(shù)值的整數(shù)次方;
public class Solution {
public double Power(double base, int exponent) {
return Math.pow(base, exponent);
}
}