skip to main |
skip to sidebar
Create A Program That Will Ask Ten Number, Then Count The Number Of Odd Numbers You Entered?
void main()
{
int i,a[10],count=0;
printf("Enter the ten numbers");
for(i=0;i<10;i++) scanf("%d",&a[i]);
for(i=0;i<10;i++) if(a[i]%2!=0) count++;
printf("The number of odd numbers is "+count);
}