#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int l,a,p=0,n=0,z=0;
for(l=1;l<=10;l++)
{
cout<<"\nenter nos.";
cin>>a;
if(a>0)
p=p+1;
else if(a<0)
n=n+1;
else
z=z+1;
}
cout<<"\npositive no's are="<<p;
cout<<"\nnegative no's are="<<n;
cout<<"\nzero no's are="<<z;
getch();
}
No comments:
Post a Comment