Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6ebb159

Browse filesBrowse files
github-actionsgithub-actions
authored andcommitted
Formatted with Google Java Formatter
1 parent 1b82826 commit 6ebb159
Copy full SHA for 6ebb159

File tree

Expand file treeCollapse file tree

1 file changed

+9
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-7
lines changed
Open diff view settings
Collapse file

‎Maths/BinaryPow.java‎

Copy file name to clipboardExpand all lines: Maths/BinaryPow.java
+9-7Lines changed: 9 additions & 7 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.