Prog#056: Mean of postive or negative or zero nos - until -1000 is given

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

#include <stdio.h>
main(){
int n=0,p=0,ne=0,z=0;
int pm=0,nem=0;
float mp,mn;
scanf("%d ",&n); 
while(n!=-1000){
if(n>0){
p=p+n;
pm=pm+1;
}
else
if(n<0){
ne=ne+n;
nem=nem+1;
}
else{
z=z+n;
}
scanf("%d ",&n); 
}
mp=p/pm;
mn=ne/nem;
printf("\n Mean of Positive : %f \n Mean of Negative : %f ",mp,mn);
}