//Downloaded From theonlinetutorials.com
//(C)1999.All rights reserved.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int p=0,nn=0,i,n,a;
cout<<"Enter teh limit :"<<endl;
cin>>n;
for(i=1;i<=n;i++)
{
cin>>a;
if(a>0)
p=p+1;
else
nn=nn+1;
}
cout<<"No of +ve ="<<p;
cout<<"No of negative ="<<nn;
getch();
}
Not Satisfied ? Just search & get the result
Related posts:
- C++ program – Sum of n even Nos
- C++ Program – Sum of Odd +ve & -ve
- C program to find the sum of odd numbers and sum of even numbers from 1 to N. Output the computed sums on two different lines with suitable headings
- Sample – Program to enter an integer and find out if it is even or odd.
- C++ program – Check for Odd or Even
