13-Write a C program to find the number is even or odd.

Program: 13

Write a C program to find the number is even or odd.

#include
#include
void main()
{
    int n;
   printf("Enter any number: ");
    scanf("%d", &n);
   if(n%2==0)
    {
       printf("Number is even.");
    }
    else
        printf("Number is odd.");
    }
    getch();
}
Output
Enter any number: 453

Number is odd.

Lokesh Kumar: Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.
Related Post
Leave a Comment

This website uses cookies.