Created
May 10, 2020 12:52
-
-
Save kryvoboker/e6dfb23587ef5c9812af3d23e1097f39 to your computer and use it in GitHub Desktop.
HomeWork5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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