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

Assignment Help:

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


Related Discussions:- C program to check even & odd no

Z transformer, how to write code for z transformer

how to write code for z transformer

Program to print a series, Write a program called Series that will print/di...

Write a program called Series that will print/display a series of numbers starting with 1 and ending with the last number that is less than 30. The series should include only odd n

Stand-alone dsp application, You are required to write a stand-alone DSP ap...

You are required to write a stand-alone DSP application in the C programming language. The overall objective of this application is to convert a signal from the time domain to t

Difference between mutex and binary semaphore, Semaphore is used to synchro...

Semaphore is used to synchronize processes. whereas mutex is used to give synchronization among threads running in the similar process.

Area under the curve, Write a c++ program to find the area under the curve ...

Write a c++ 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 c

Text Editor, Add a function for saving the text stored in an array to a fil...

Add a function for saving the text stored in an array to a file. Your program must check whether or not the output file already exists, and if it does, your program must ask the us

Wap in c to find determinant of matrix order 3x3 , Normal 0 fal...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

C program to demonstrate pointer to string, C program to demonstrate Pointe...

C program to demonstrate Pointer to string: void main() {                 int a;                 char str[]="hello how are you?",*ptr_str;                 ptr_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