C Program to Check Whether Given Number is Even or Odd

In this program, you will learn to check whether a number entered by the user is even or odd.

Source Code
void main()
    int no;
    printf("Enter a number: ");
    scanf("%d", &no);

    if(no%2 == 0)
        printf("Number is Even number");
        printf("Number is Odd Number");
Enter a number: 15
Number is Odd Number

Enter a number: 84
Number is Even number

"Coding Hub - Learn to code" app now available on Google Play Store