int func(int *arr,int n)
{
int i,count = 0;
for(I = 0; I & ltn;; i++)
if(arr[I]& gt; 0)
count++;
Returns the count;
}
int main()
{
int a[ 10],I;
for(I = 0; I< 10; i++)
scanf("%d ",& ampa[I]);
Printf ("number of positive integers: %d \n", func(a,10));
Returns 0;
}
Example of running results:
- 1 -2 4 5 6 -9 -8 10 -3 0
The number of positive integers is: 4