#includevoid main(){ int a[10] = {0}; int n = 0; int sum = 0; printf("请输入10个整数\n"); for (int i=0;i<10;i++) { scanf("%d",&a[i]); if (a[i]>0) { n++; sum+=a[i]; } } printf("正数个数为%d个,正数和为%d\n",n,sum);}