int srr[] = new int[10];int sum = 0;int sun = 0;Random random = new Random();for (int i = 0; i < srr.length; i++) {srr[i] = random.nextInt(100);}for (int i = 0; i < srr.length; i++) {System.out.println(srr[i]);}for (int i = 0; i < srr.length; i++) {if (srr[i]%2 != 0) {sum = sum + srr[i];}if (srr[i]%2 == 0) {sun = sun + srr[i];}}System.out.println("奇数之和为:"+sum);System.out.println("偶数之和为:"+sun);