Home
User Guide
DB Recovery
Download
Documents
FAQ
Books
About Me
C Programs
Stats

/* Program# 54
   date : 28-12-2008
   Count of postive or negative or zero nos - until -1000 is given.
	
*/

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






Powered by
Open Source Programmers