MCPcopy Create free account
hub / github.com/LFYSec/MScan / countOnes

Method countOnes

src/test/resources/sideeffect/PureTest.java:8–14  ·  view source on GitHub ↗
(int[] array, int len)

Source from the content-addressed store, hash-verified

6 }
7
8 public static int countOnes(int[] array, int len) {
9 int ret = 0;
10 for (int i=0; i<len; i++) {
11 ret = (array[i]==1)? ret+1 : ret;
12 }
13 return ret;
14 }
15
16}

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected