#include
;
int main(int argc, char **argv) {
int i, n, m, jh = 0, oh = 0, jg = 0, og = 0;
printf("请输入n值:n");
scanf("%d", n); //先输入数据数n
printf("请输入%d数,按空格键隔开:n", n);
for (i = 0; i < n; i++) {
scanf("%d", m);
if (m % 2 != 0) {
jh = jh + m;
jg++;
} else {
oh = oh + m;
og++;
}
} //利用循环输入n数并计算
printf("n奇数数:%dn奇数和:%dn偶数数:%dn偶数和:%dn", jg, jh, og, oh); //打印
return 0;
}