Prog#108: counting no.of Positive, Negative or Zero

/* 
Program#108
counting no.of Positive, Negative or Zero
*/

#include <stdio.h>
main(){
int n;
int p,ne,z;

p=ne=z=0;

for(scanf("%d",&n);n!=-1000;scanf("%d",&n)){
if(n>0)
p++;
else
if(n<0)
ne++;
else
if(n==0)
z++;
}
printf("\n %d %d %d",p,ne,z);
}