//this is a program to find the number of positive negative and zero elements from the entered array
#include<stdio.h>
#include<conio.h>
void main()
{
int posi=0,nega=0,zero=0,i,a[10];
printf("\n\nAccepting the elemts of array A: ");
for(i=0;i<10;i++)
{
printf("\n\nEnter Any number: ");
scanf("%d",&a[i]);
}
//finding the positive,negative and zero
for(i=0;i<10;i++)
{
if(a[i]>0)
posi++;
else if(a[i]<0)
nega++;
else
zero++;
}
printf("\n\nPositive Numbers=%d\n\nNegative numbers=%d\n\nZeros=%d",posi,nega,zero);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int posi=0,nega=0,zero=0,i,a[10];
printf("\n\nAccepting the elemts of array A: ");
for(i=0;i<10;i++)
{
printf("\n\nEnter Any number: ");
scanf("%d",&a[i]);
}
//finding the positive,negative and zero
for(i=0;i<10;i++)
{
if(a[i]>0)
posi++;
else if(a[i]<0)
nega++;
else
zero++;
}
printf("\n\nPositive Numbers=%d\n\nNegative numbers=%d\n\nZeros=%d",posi,nega,zero);
getch();
}