(int[] vals)
| 34 | } |
| 35 | |
| 36 | public static int getSum(int[] vals) |
| 37 | { |
| 38 | if (vals.length <= 0) |
| 39 | { |
| 40 | return 0; |
| 41 | } |
| 42 | else |
| 43 | { |
| 44 | int i = 0; |
| 45 | |
| 46 | for (int j = 0; j < vals.length; ++j) |
| 47 | { |
| 48 | int k = vals[j]; |
| 49 | i += k; |
| 50 | } |
| 51 | |
| 52 | return i; |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | public static int roundDownToPowerOfTwo(int val) |
| 57 | { |
no outgoing calls
no test coverage detected