Prog#055: Sum of postive or negative or zero nos - until -1000 is given

/* 
Program#55
Sum of postive or negative or zero nos - until -1000 is given.
*/

#include <stdio.h>
main(){
int n=0,p=0,ne=0,z=0;
scanf("%d ",&n); 
while(n!=-1000){
if(n>0)
p=p+n;
else
if(n<0)
ne=ne+n;
else
z=z+n;
scanf("%d ",&n); 
}
printf("\n Positive : %d \n Negative : %d \n Zero : %d",p,ne,z);
}