//Write a programme to check whether the given number is even number or not ?

Write a programme to check whether the given number is even number or not ?

Q) Write a programme to check whether the given number is even number or not ?

 

Even number condition :

A number is said to be an even number if it is divisible by 2 ( n%2 ==0 )  otherwise it is not a even number .

CODE :


#inlcude
int main(void)
{
    int n;
    printf("Enter the number n");
    scanf("%d",&n);
    if(n%2==0)
    {
        printf("Given number is even number ");
    }
    else
    {
        printf("Given number is not even number ");
    }
 return 0;
 }

 

OUTPUT :
     Enter the number
     6
     Given number is even number


If any one intrested to post something stuff that you done , you can freely post by just registering  in our website   http://www.learningbuz.com/create-post/  and you can expose your stuff to the world .