#include <stdio.h> int main() { int arr[10] = {0}; int i, cnt1 = 0, cnt2 = 0; for(i=0; i<10; i++) scanf("%d ", &arr[i]); for(i=0; i<10; i++) { if(arr[i] < 0) cnt1++; //负数计数 else if(arr[i] > 0) cnt2++; //正数计数 } printf("positive:%d\n", cnt2); printf("negative:%d\n", cnt1); return 0; }