File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments