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

Assignment Help:

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;

}

 


Related Discussions:- Program to find whether a number is odd or even

Euclidean Algorithm , how can I find the GCD of 2 given numbers using Eucli...

how can I find the GCD of 2 given numbers using Euclidean Algorithm ?

Answer, what is spanning tree? explain prims algorithm spanning tree?

what is spanning tree? explain prims algorithm spanning tree?

Area under curve, Write a program to find the area under the curve y = f(x)...

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.

Program to display asterisks in the shape of a plus sign, Write a program c...

Write a program called plus that will display asterisks in the shape of a plus sign which has the height and width specified by the user. You must only allow entry of an odd numb

Program to calculate tax - c++, Program to calculate tax: float tax (f...

Program to calculate tax: float tax (float) ; int main() {                 float purchase, tax_amt, total;                 cout                 cin >> purchase

Functions, program that convert take decimal digit and convert it to binart...

program that convert take decimal digit and convert it to binart digit

basic salary of employees & calculate net salary, basic salary of employee...

basic salary of employees & calculate net salary in C++ Programming

Explain bit-wise operators, Bit-wise Operators Some applications requir...

Bit-wise Operators Some applications require operations to be done on dissimilar bits of a byte separately. Bit-wise operators offer a facility to do just that. There are vario

Puzzles, #questioA Padovan string P(n) for a natural number n is defined as...

#questioA Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a str

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd