Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get odd number in array

public int[] findEvens() {
  int numberEvens = 0;
  for (int i = 0; i < numbers.length; i++) {
     if (i % 2 == 0) {
        numberEvens++;
     }
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #odd #number #array
ADD COMMENT
Topic
Name
3+6 =