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
Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Using Figure 10.2 as a model, illustrate the result of each operation in the sequence ENQUEUE.Q; 4/, ENQUEUE.Q; 1/, ENQUEUE.Q; 3/, DEQUEUE.Q/, ENQUEUE.Q; 8/, and DEQUEUE.Q/ on an i

Tell what the derived class inherits or doesn't inherit? A: Inherits: - All data member defined in the parent class (even though such members might not always be accessible


C Program for FIND EVEN & ODD NO.S IN THE ARRAY #include stdio.h> #include string.h> #include conio.h> void main() {           int i=0,j=0, l_e[100],l_o[100];

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

write a program that counts the number of occurences of the string in the n-th Padovan string P(n) program in java // aakash , suraj , prem sasi kumar kamaraj college progr

Explain some String Oriented Library Functions? To make simpler string processing we can use special string oriented library functions. Mainly the C compilers include library f

write c++ program to decode the given code. in mobile keypad the integers from 1 to 9 will display the characters from a to z and 0 will assign a space

While spending the summer as a surveyor’s assistant, you decide to write a program that transforms compass headings in degrees (0-360) to compass bearings. A compass bearing consis