Program to find whether a number is odd or even, C/C++ Programming

PROGRAM TO FIND WHETHER A NUMBER IS ODD OR EVEN

int main()

{

int number ;

printf("Enter a whole number\n");

scanf("%d",&number);

if(number % 2 == 0)

printf("number is even.\n");

else

printf("number is odd.\n");

 

return 0;

}

 

Posted Date: 9/10/2012 9:13:57 AM | Location : United States







Related Discussions:- Program to find whether a number is odd or even, Assignment Help, Ask Question on Program to find whether a number is odd or even, Get Answer, Expert's Help, Program to find whether a number is odd or even Discussions

Write discussion on Program to find whether a number is odd or even
Your posts are moderated
Related Questions
what are 3 conditions under which the sequential search of a list is preferable to binary search?



We are seeking a talented developer/team with great experience in programming apps for both Android and iOS. Our project needs great skills and experience in making good functional

This question deals with AVL trees. The representation to be used is similar to the bank account object discussed in class. (a) Define a procedure called make-avl-tree which mak


to calculate the amount to be paid by a customer buying yummy cupcakes for his birth day party

Define the Char Data Type of C Language? The char defines characters. The char type will usually require only 1 byte of internal storage. Every char type has an equivalent inte

How to define a derived class ? A singly inherited derived class id defined by writing : The keyword class. The name of the derived class . A single colon (:).

# include stdio.h> # include conio.h> # include string.h> void main()   {           int i=0,j=0;           char a[100],temp;           clrscr();