google-site-verification: googlef8aa845b858144d3.html COMPUTER SCIENCE NOTES: Even Odd: (Example 4) Write a program to check whether the given number ...

Thursday, March 2, 2017

Even Odd: (Example 4) Write a program to check whether the given number ...



/* 4 program of even odd number */

#include<stdio.h>

#include<conio.h>

void main()

{

int n,a;

clrscr();

printf("Enter a number :");

scanf("%d",&n);

a=n<<(8*sizeof(int)-1);

if(a==0)

printf("even number");

else

printf("odd number");

getch();

}

No comments:

Post a Comment