C program to check even & odd no, C/C++ Programming

C Program to Check  EVEN & ODD NO

 

main()

{

          int n, a;

          clrscr();

          printf("ENTER ANY NUMBER: ");

          scanf("%d", &n);

          a=n%2;

          if(a==0)

          {

                    printf("THE NUMBER IS EVEN...\n");                   

          }

          else

          {

                    printf("THE NUMBER IS ODD...\n");

          }

          getch();

}

 

OUTPUT :

Enter Any No: 5

The number is odd

Posted Date: 9/10/2012 2:02:52 AM | Location : United States







Related Discussions:- C program to check even & odd no, Assignment Help, Ask Question on C program to check even & odd no, Get Answer, Expert's Help, C program to check even & odd no Discussions

Write discussion on C program to check even & odd no
Your posts are moderated
Related Questions
C Program to FIND VOWELS AND REMOVE VOWELS void main() {           char s[100],s1[100];           int i,j,k=0;           clrscr();           printf("ENTER ANY S

Variables Information stored in a variable can alter in the course of the program. The type used in the definition explains the kind of information the symbol can store. Variab

C Program for SORTING OF LONG WORD WITH DIFFERENT STRING #include stdio.h> #include conio.h> #include string.h>   void main() {           char n[50],c[25][25]

code for solving optimal solution for matrix

how can i easily make a program?

write a program that counts the number of occurances of the string in the n-th padovan string p(n)

A: This is a name that acts as an alias, or alternative name, for a beforehand defined variable or an object. prepending variable along with "&" symbol makes it as reference. fo

I have a assignment deadline is 11.11.2015 can I get help

Hey vrcoder I have got similar way but the game builder has sent me the game unfinished and left. I saw it on a link on line but they have wiped the old message with the link in it

Relational Operators A relational operator is used to make comparison among two values. All these operators are binary and needs two operands. There are the following relationa