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

From Lifting Light Weights to Building Confidence 💪 | My Fitness Journey ✨

  https://www.youtube.com/watch?v=nyX7g3GRGDw Hi, namaste Kam. So I had to make this video about how I joined the gym and it did made a grea...