Saturday, October 24, 2020

c program to display whether the given number is even or odd

 #include <stdio.h>

int main() {

    int n;

    printf("Enter a number:");

    scanf("%d",&n);

    if(n%2==0)

    {

        printf("N is even", n);

    }

    else

    {

        printf("N is odd",n);

    }

}

No comments:

Post a Comment

Understand Them First ❤️ | A Grandmother’s Journey, Emotions & the Power of Empathy ✨

  https://www.youtube.com/watch?v=EUm5_llWHBQ Hi, namaste Kamj. So, uh I just have been going through something in my life that I wanted to ...