You are on page 1of 1

Enter the 10 numbers and tell how many are positive, negative and zero

============================================
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int no,positive=0,negative=0,zero=0;

for (int i=1;i<=10;i++)


{
cout<<"Enter No"<<i<<": ";
cin>>no;

if (no<0)
{
negative++;
}
elseif (no>0)
{
positive++;
}
else
{
zero++;
}
}

cout<<"\n\nThe Positive Nos are: "<<positive;


cout<<"\n\nThe Negative Nos are: "<<negative;
cout<<"\n\nThe Zeros are: "<<zero;

getch();
}

http://www.ravianeducation.blogspot.com
FARHAN: 03008855006