Skip to content

Instantly share code, notes, and snippets.

@kryvoboker
Created May 10, 2020 12:52
Show Gist options
  • Save kryvoboker/e6dfb23587ef5c9812af3d23e1097f39 to your computer and use it in GitHub Desktop.
Save kryvoboker/e6dfb23587ef5c9812af3d23e1097f39 to your computer and use it in GitHub Desktop.
HomeWork5
public class Main {
public static void main(String [] args) {
int [] array = {0, 5, 2, 4, 7, 1, 3, 19};
int n = 0;
for (int i = 0; i < array.length; i++) {
if (array[i] % 2 != 0) {
n += 1;
}
}
System.out.println(n);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment