题解 | #统计数据正负个数#
统计数据正负个数
https://www.nowcoder.com/practice/3f33889582934a09b4e3ddd3cc976226
#include <stdio.h>
int main() {
int a;
int z=0;
int x=0;
while (scanf("%d", &a) != EOF) {
getchar();
if(a>0)z++;
else x++;
}printf("positive:%d\n",z);
printf("negative:%d\n", x);
return 0;
}
查看26道真题和解析
顺丰集团工作强度 345人发布