C

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;
 }
(more…)

By Galla Anand, ago