-
-
Save mariiaKolokolova/e31d1aee266fc2c90a52cb84475315bc to your computer and use it in GitHub Desktop.
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
package maricka.kolokolova; | |
public class Main { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
int cn = 0; | |
int[] mas = { 0, 5, 2, 4, 7, 1, 3, 19 }; | |
for (int i = 0; i < mas.length; i++) { | |
if (mas[i] % 2 != 0) { | |
cn = cn + 1; | |
} | |
} | |
System.out.println("Count of odd numbers in the string is : " + cn); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment