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 is the use of default constructor? - It's a constructor that doesn't accept any parameters. - If there is no user-defined constructor for a class, compiler declares a d

A: This will turn o_ "name mangling" for func so that one can connect to code compiled by a C compiler.

Explain about Evaluation of Expression in c language? An Expressions are evaluated using an assignment statement of the form: variable = expression; The Variable is any v


Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Different implementations of OOP Object-oriented programming is not mainly concerned with the details of the program operation. Instead, it deals with the overall design of the

A: Use std::ios::binary. Some operating systems differentiate among text and binary modes. In text mode, end-of-line sequences and perhaps other things are translated; in binary


Q: When should you employ multiple inheritance? A:There  are  three  acceptable  answers:-  "Rarely," "Never," and  "while  the  problem  domain cannot be modeled accurately any

I need website Product section search box coding section fix Project Description: On our products section in the search box it only searches the name and title of our product