Thursday, June 6, 2019

Write a program to find the given number is even or odd using functions

/* ***********************************************
    Write a program to find the given number is even or odd using functions

 date:06-06-2019
 created by:ANIL DURGAM

*****************************************************/


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,b;
    printf("Enter a number\n");
    scanf("%d",&a);
    b=even_odd_fn(a);
    if(b==0)
    {
        printf("even number\n");
    }
    else
        {
            printf("odd number\n");
        }
    return 0;
}
  int  even_odd_fn(a)
  {
    int n=0;
    n=a%2;
    return n;


  }


out put:::



Note:
please send the questions which you are facing problem in C Language.
also write interview questions which are you faced in during interview related to C Language.
so i can try to solve them and send you back.

No comments:

Post a Comment

python class topic video