package com.thealgorithms.maths;
public class PowRecursion {
public static void main(String[] args) {
assert Double.compare(pow(2, 0), Math.pow(2, 0)) == 0;
assert Double.compare(pow(0, 2), Math.pow(0, 2)) == 0;
assert Double.compare(pow(2, 10), Math.pow(2, 10)) == 0;
assert Double.compare(pow(10, 2), Math.pow(10, 2)) == 0;
}
public static long pow(int a, int b) {
return b == 0 ? 1 : a * pow(a, b - 1);
}
}