Skip to content

Commit 12b72f4

Browse files
committed
power added
1 parent 7e97177 commit 12b72f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Calculator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ public double divide(int a, int b) {
66
if (b == 0) throw new ArithmeticException("Divide by zero");
77
return (double) a / b;
88
}
9+
public double power(double base, double exponent) {
10+
return Math.pow(base, exponent);
11+
}
912
}

0 commit comments

Comments
 (0)