Skip to content

Commit 6ebb159

Browse files
github-actionsgithub-actions
github-actions
authored and
github-actions
committed
Formatted with Google Java Formatter
1 parent 1b82826 commit 6ebb159

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Maths/BinaryPow.java

+9-7
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,28 @@ public static int binPow(int a, int p) {
2121
return res;
2222
}
2323

24-
/**
24+
/**
2525
* Function for testing binary exponentiation
26-
* @param a the base
26+
*
27+
* @param a the base
2728
* @param p the exponent
2829
*/
29-
public static void test(int a, int p) {
30+
public static void test(int a, int p) {
3031
int res = binPow(a, p);
3132
assert res == (int) Math.pow(a, p) : "Incorrect Implementation";
3233
System.out.println(a + "^" + p + ": " + res);
3334
}
3435

35-
/** Main Function to call tests
36-
*
36+
/**
37+
* Main Function to call tests
38+
*
3739
* @param args System Line Arguments
3840
*/
3941
public static void main(String[] args) {
4042
// prints 2^15: 32768
41-
test(2, 15);
43+
test(2, 15);
4244

4345
// prints 3^9: 19683
44-
test(3,9);
46+
test(3, 9);
4547
}
4648
}

0 commit comments

Comments
 (0)