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

All Quotes

 Quote 53: Ethical earning is key. Quote 52: Grades matter, but your skills, curiosity, and consistency matter even more. Quote 51: Be curio...