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 difference between require_once (), require(), include()? require() includes and evaluates a specific file, if file isn't found then it shows a Fatal Error. require_

Program1: Write a program to find the factorial of a given number. The input is user given. Final output is printed out on to the screen. Program2: Write a program to gene

exemples of many to many

brief note on multiple stack

print this pattern 1 01 101 0101

#write a multilevel c++ program to take marks of 3 subjects and calculate percentage and display it

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Hi, I need quick sort program without using recursion

what is a string?

Dereferencing the Pointer this Sometimes a member function requires to make a copy of the invoking instance so that it can change the copy without affecting the original instan