Sep 30, 2011

C program to check whether a given integer is odd or even.

Write a C program to check whether a given integer is odd or even.Read more about C Programming Language .
* You can use all the programs on
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact
* To find more C programs, do visit
* and browse!
*                                  Happy Coding

#include <stdio.h>
#include <conio.h>

void main()
 int ival, remainder;


 printf("Enter an integer :");
 scanf ("%d", &ival);

 remainder = ival % 2;

 if (remainder == 0)
  printf ("%d, is an even integer\n", ival);
  printf ("%d, is an odd integer\n", ival);

Read more Similar C Programs
Searching in C

Number Theory 
C Strings
You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!