by Dinesh Thakur Category: C Programming (Pratical)

This is program that ask user to check whether the given number is odd or even. That number divided by odd number Is odd else it is even. In this program user declare required variables that are use to contain the value. And the control statement also used like if else for checking the manipulated condition. If the given digit division able with odd number then it will be odd else it will be even number.

Problem Statement:
This is the C program where users ask to check the number is odd or even.

  1. Declaring variable.
  2. Using control statement.
  3. Display result on the screen.

Here is C source code for check whether the Given Number is odd or even. The output of this program shown below

 

#include<stdio.h>

void main()
{
     int a;
     clrscr();
     printf ("Enter the No : ");
     scanf("%d",&a);
     if(a%5==0)
       {
           printf("No.is Divisible by 5");
       }
     else
      {
           printf("No is not Divisible by 5");
      }
           getch();
}
Output :

C Program Write a Program to Check the Number Odd or Even

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Search Content