题目内容
public class Array1{public static void main(String[] args) {int odd = 0, even = 0;int[] array = new int[] { 0, 4, 7, 8, 9, 10, 0, 0, 14, 19, 24, 29 };for (int i : array) {if (i % 2 == 0) {even++;}else{odd++;}}System.out.printf("偶数=%d,奇数=%d", even, odd);}}
查看答案
搜索结果不匹配?点我反馈