24.Count positive integer in Array
#include<stdio.h>
int main(){
int count=0;
int arr[10];
printf("Enter 10 integers\n :");
for(int i=0; i<10; i++)
{
scanf("%d",&arr[i]);
if(arr[i]>0)
{ count++;}
}
printf("Total positive integers are :%d",count);
return 0;
}
Comments
Post a Comment