题解 | #统计数据正负个数#
统计数据正负个数
https://www.nowcoder.com/practice/3f33889582934a09b4e3ddd3cc976226
#include <stdio.h>
int main() {
int n = 0;
int positive = 0;
int count = 1;
while (scanf("%d", &n) != EOF, count <= 10) {
if (n >= 0) {
positive++;
}
count++;
}
printf("positive:%d\nnegative:%d",positive,10-positive);
return 0;
}
顺丰集团工作强度 381人发布
