Write a function is Even, which accepts an integer as parameter and returns 1 if the number is even, and 0 otherwise. Use this function in main to accept n numbers and check if they are even or odd.


#include<stdio.h>
#include<conio.h>
int iseven(int num);
void main()
 {
  int num,ans;
clrscr();
printf("\n enter the value of num");
scanf("\n %d",&num);
ans=iseven(num);
if(ans==1)
{
 printf("\n number is even");
}
if(ans==0)
{
 printf("\n number is odd");
}
getch();
}
int iseven(int num1)
{
  if(num1%2==0)
    {
return 1;
}
else
{
return 0;
}
}
/* output

 enter the value of num7
number is odd */