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

Program that allows a restaurant employee to enter an order, The Malt Shop ...

The Malt Shop restaurant charges $2.99 for burgers, $1.29 for fries, and $1.25 for sodas.  Write a program that allows a restaurant employee to enter an order (the number of bur

Explain pointers to objects, Pointers to Objects Passing and returning ...

Pointers to Objects Passing and returning of objects is, though, not very efficient since it includes passing and returning a copy of the data members. This problem can be elim

Write a program to illustrate array of structures, Write a program to illus...

Write a program to illustrate array of structures? struct customer { int id; char name[15]; }; struct customer c[100]; . In the above instance, the array of Structures is

Write a c program as text layout, Your task in this project is to write a C...

Your task in this project is to write a C program named layout.c which does text layout. This is a staged project, complete the stages in order. The maximum mark if you nish each

Write a program to calculate the total resistance, Write a program to calcu...

Write a program to calculate the total resistance of a series or parallel circuit. The maximum number of resistors is two.   We need to decide whether the user wants the to

Stack over flow for sun sparc, Please use C or C++ to write your programs. ...

Please use C or C++ to write your programs. Our homework will focus on SUN sparc machines because to exploit x86 stack-overflow is too easy. This is not just a programming assignme

Call by reference, Call by reference: Arguments to a function can be pa...

Call by reference: Arguments to a function can be passed in two way; one by call by value and other by call by reference.  Call by value is passed either through a constant

My program, palindrome program with minimum character replacements

palindrome program with minimum character replacements

What is the difference between javascript and php, What is the difference b...

What is the difference between JavaScript and PHP? The difference lies with the execution of languages. PHP is server side scripting language, which means that it cannot intera

Minimumshelf, Write a program that finds the minimum total number of shelve...

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.

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