write a program to find the number of even integers and odd
integers in a given array in c language
Answer Posted / rahul khare
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],even=0,odd=0,i;
for(i=0;i<9;i++)
{
if(a[i]%2==0)
{
printf("%d\t",a[i]);
even++;
}
else
{
printf("%d\t",a[i]);
odd++;
}
}
printf("Total no of Even found is=%d",even);
printf("Total no of Odd found is=%d",odd);
getch();
}
Is This Answer Correct ? | 134 Yes | 75 No |
Post New Answer View All Answers
What is difference between && and & in c?
How can I read in an object file and jump to locations in it?
I need a sort of an approximate strcmp routine?
how to find anagram without using string functions using only loops in c programming
how to create duplicate link list using C???
What is the right way to use errno?
What is null pointer constant?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
What was noalias and what ever happened to it?
What is typedf?
Whats s or c mean?
Why doesnt the call scanf work?
Can you define which header file to include at compile time?
Why doesnt long int work?
find out largest elemant of diagonalmatrix